Learn R Programming

rcdd (version 1.6)

makeV: make V-representation of convex polyhedron

Description

Construct V-representation of convex polyhedron. See scdd for description of valid representations.

Usage

makeV(points, rays, lines, x = NULL)
addVpoints(points, x)
addVrays(rays, x)
addVlines(lines, x)

Value

a valid V-representation that can be handed to scdd.

Arguments

points

numerical or character matrix for points. If vector, treated as matrix with one row. Each row is one point.

rays

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.

lines

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.

x

if not NULL, a valid V-representation.

Rational Arithmetic

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.

Details

In makeV the arguments points and rays and lines may be missing.

See Also

scdd, validcdd

Examples

Run this code
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