Skip to contents

The Minkowski–Weyl form \(\mathrm{conv}(V) + \mathrm{cone}(R) + \mathrm{span}(L)\) (Ziegler 1995, Theorem 1.2), base of every convex region in the package. polytope_region(), simplex_region(), halfspace_region(), point_region() and real_region() are friendlier special cases; use h_region() to start from a half-space description.

print() summarises generator and facet counts, and lists the vertices of a small polytope.

Usage

polyhedron_region(vertices = NULL, rays = NULL, lines = NULL, .hv = NULL)

Arguments

vertices

(nv, d) numeric matrix, one vertex per row, or NULL for a cone anchored at the origin.

rays

(nr, d) numeric matrix of recession directions, one per row, or NULL.

lines

(nl, d) numeric matrix whose rows span the lineality space, or NULL.

.hv

Internal use only.

Value

A polyhedron_region.

Details

The chart() is \(\theta(u) = a V + z L + c R\) with u = (a, z, c) (vertex weights, lineality, rays), subject to a >= 0, sum(a) = 1 and c >= 0. A lone vertex contributes no coordinate, so n_par = nv + nl + nr when nv > 1 and nl + nr otherwise.

Properties

generators

list(v, r, l) of numeric matrices, one generator per row. Read-only: derived from the static underlying record.

facets

The half-space description (A, B, eq), read as a %*% theta <= b for each row, with eq flagging when equality should hold rather than inequality for each row. Read-only.

hv

Internal record of both descriptions in double and exact rational form, computed once at construction.

References

Ziegler GM (1995). Lectures on Polytopes, volume 152 of Graduate Texts in Mathematics. Springer. doi:10.1007/978-1-4613-8431-1 .

Examples

# The halfspace `{theta_1 <= 0}` in R^2, by hand:
polyhedron_region(
  vertices = matrix(c(0, 0), nrow = 1),
  rays = matrix(c(-1, 0), nrow = 1),
  lines = matrix(c(0, 1), nrow = 1)
)
#> <polyhedron_region>
#>   1 vertex, 1 ray, 1 line in R^2, unbounded
#>   facets: 2 inequalities