Description Usage Arguments Value Examples
View source: R/etas_vertices.R
This function converts a KxK matrix "eta" into
a matrix listing the vertices of the associated polytope within the simplex of dimension K.
The matrix "eta" describes
constraints of the form: theta_l / theta_k <= etak,l,
or equivalently theta_l -
etak,l theta_k <= 0, on top of the additional constraint that
theta must be in the simplex: i.e. sum_j<K theta_j <=
1, -theta_j <= 0.
The function calls the package rcdd
(mimicking what's done in the hitandrun
package) to obtain the coordinates of the
vertices of the polytope, i.e. the V-representation.
1 | etas_vertices(etas)
|
etas |
a matrix of values, such as produced by |
The vertices of the polytope in barycentric coordinates, in an M x K matrix with M rows if there are M vertices.
1 2 3 4 5 | ## Not run:
etas <- rejection_sampler(c(1,0,3,2))$etas
etas_vertices(etas)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.