Description Usage Arguments Value Note Author(s) Examples

Returns a `d`

by `n + 1`

dimensional matrix representing the
`d`

vertices of the polytope represented by `Ax <= b`

.

1 | ```
enumerate.vertices(A, b, warn_if_open=FALSE)
``` |

`A` |
An |

`b` |
A |

`warn_if_open` |
Boolean. |

A `d`

by `n + 1`

dimensional matrix. The rows of this matrix
represent the `d`

vertices of the polytope represented by
the system `Ax <= b`

. If the optional argument warn_if_open is
set to TRUE, then a warning will be printed if the system of
inequalities is not closed, i.e. if it contains an extreme ray.

This is a port of the lrs library for vertex enumeration (http://cgm.cs.mcgill.ca/~avis/C/lrs.html). The source was written by David Avis.

Robert Robere robere@cs.toronto.edu

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
library(vertexenum)
## example vertex enumeration
## the system Ax <= b represents a unit square, with
## the lower left corner at the origin
A <- rbind(c(-1, 0), c(0, 1), c(1, 0), c(0, -1))
b <- c(0, 1, 1, 0)
## outputs a 4 x 2 matrix, each row corresponds to a vertex
enumerate.vertices(A, b)
## second example
## this is a unit square, with lower left corner at the origin, missing
## a facet on the right side
A <- rbind(c(-1, 0), c(0, 1), c(0, -1))
b <- c(0, 1, 0)
## outputs a 2 x 2 matrix, each row corresponds to a vertex
## will print a warning, since the input set described by Ax <= b
## is not closed
enumerate.vertices(A, b, warn_if_open=TRUE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.