makeH {rcdd} | R Documentation |
Construct H-representation of convex polyhedron,
set of points x
satisfying
a1 %*% x <= b1 a2 %*% x == b2see
scdd
for description of valid representations.
makeH(a1, b1, a2, b2, x = NULL) addHeq(a, b, x) addHin(a, b, x)
a1 |
numerical matrix for inequality constraints. If vector, treated as matrix with one row. |
b1 |
numerical right hand side vector for inequality constraints. |
a2 |
numerical matrix for equality constraints. If vector, treated as matrix with one row. |
b2 |
numerical right hand side vector for equality constraints. |
x |
if not NULL , a valid H-representation. |
a |
numerical matrix for constraints. If vector, treated as matrix
with one row. Constraints are equality in addHeq and inequality
in addHin . |
b |
numerical right hand side vector for constraints. |
Arguments a1
, b1
, a2
, and b2
may be missing,
but must be missing in pairs.
Rows in x
, if any, are added to new rows corresponding to
the constraints given by the other arguments.
a cdd object that can be handed to scdd
.
d <- 4 # unit simplex in H-representation qux <- makeH(- diag(d), rep(0, d), rep(1, d), 1) print(qux) # add an inequality constraint qux <- addHin(c(1, -1, 0, 0), 0, qux) print(qux) # drop a constraint qux <- qux[- 3, ] print(qux)