Skip to contents

What was originally constructed, unchanged; a convex region is its own only part. Use cells() instead when feeding an optimiser or for visualisation.

Usage

parts(space)

Arguments

space

A region.

Value

A list of convex_region objects.

Examples

s <- simplex_region(vertices = diag(3))
parts(s)
#> [[1]]
#> <simplex_region>
#>   3 vertices in R^3
#>   facets: 3 inequalities, 1 equality
#>   vertices:
#>      [,1] [,2] [,3]
#> [1,]    1    0    0
#> [2,]    0    1    0
#> [3,]    0    0    1
#> 
parts(union_region(s, halfspace_region(normal = c(1, -1, 0))))
#> [[1]]
#> <simplex_region>
#>   3 vertices in R^3
#>   facets: 3 inequalities, 1 equality
#>   vertices:
#>      [,1] [,2] [,3]
#> [1,]    1    0    0
#> [2,]    0    1    0
#> [3,]    0    0    1
#> 
#> [[2]]
#> <halfspace_region>
#>   the halfspace normal . theta <= 0, normal (1, -1, 0), unbounded
#>   facets: 1 inequality
#>