etas_vertices: Convert matrix of eta values into list of vertices

Description Usage Arguments Value Examples

View source: R/etas_vertices.R

Description

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.

Usage

1

Arguments

etas

a matrix of values, such as produced by gibbs_sampler or rejection_sampler.

Value

The vertices of the polytope in barycentric coordinates, in an M x K matrix with M rows if there are M vertices.

Examples

1
2
3
4
5
## Not run: 
etas <- rejection_sampler(c(1,0,3,2))$etas
etas_vertices(etas)

## End(Not run)

pierrejacob/montecarlodsm documentation built on June 16, 2021, 1:06 p.m.