findVertices: Find vertices of the polytope

View source: R/bound.R

findVerticesR Documentation

Find vertices of the polytope

Description

Find the vertices of a polytope given by a set of linear constraints.

Usage

findVertices(constr, homogeneous=FALSE)

Arguments

constr

Constraint definition

homogeneous

Whether constr is given in homogeneous coordinate representation

Details

See har for a description of the constraint definition and the homogeneous coordinate representation.

Uses the Avis-Fukuda pivoting algorithm to enumerate the vertices of the polytope.

Value

A matrix, in which each row is a vertex of the polytope.

Author(s)

Gert van Valkenhoef

See Also

har

findExtremePoints findInteriorPoint

scdd

Examples

# constraints: x_1 >= 0, x_2 >= 0, x_1 + x_2 <= 1
A <- rbind(c(-1, 0), c(0, -1), c(1, 1))
b <- c(0, 0, 1)
d <- c("<=", "<=", "<=")
constr <- list(constr=A, rhs=b, dir=d)

findVertices(constr, homogeneous=FALSE)

hitandrun documentation built on May 28, 2022, 1:09 a.m.