Construct V-representation of convex polyhedron.
See scdd
for description of valid representations.
makeV(points, rays, lines, x = NULL)
addVpoints(points, x)
addVrays(rays, x)
addVlines(lines, x)
a valid V-representation that can be handed to scdd
.
numerical or character matrix for points. If vector, treated as matrix with one row. Each row is one point.
numerical or character matrix for points. If vector, treated as matrix with one row. Each row represents one ray consisting of all nonnegative multiples of the vector which is the row.
numerical or character matrix for points. If vector, treated as matrix with one row. Each row represents one line consisting of all scalar multiples of the vector which is the row.
if not NULL
, a valid V-representation.
The input representation may
have type "character"
in which case its elements are interpreted
as unlimited precision rational numbers. They consist of an optional
minus sign, a string of digits of any length (the numerator),
a slash, and another string of digits of any length (the denominator).
The denominator must be positive. If the denominator is one, the
slash and the denominator may be omitted. This package
provides several functions (see ConvertGMP and ArithmeticGMP)
for conversion back and forth between R floating point numbers and rationals
and for arithmetic on GMP rationals.
Arguments may be a mix of numeric and character in which case all are converted to GMP rationals (character) and the output is GMP rational.
In makeV
the arguments points
and rays
and lines
may be missing.
scdd
, validcdd
d <- 4
n <- 7
qux <- makeV(points = matrix(rnorm(n * d), ncol = d))
out <- scdd(qux)
out$output
Run the code above in your browser using DataLab