Learn R Programming

volesti (version 1.1.0)

gen_rand_hpoly: Generator function for random H-polytopes

Description

This function generates a \(d\)-dimensional polytope in H-representation with \(m\) facets. We pick \(m\) random hyperplanes tangent on the \(d\)-dimensional unit hypersphere as facets.

Usage

gen_rand_hpoly(dimension, nfacets, seed = NULL)

Arguments

dimension

The dimension of the convex polytope.

nfacets

The number of the facets.

seed

Optional. A fixed seed for the generator.

Value

A polytope class representing a H-polytope.

Examples

Run this code
# NOT RUN {
# generate a 10-dimensional polytope with 50 facets
P = gen_rand_hpoly(10, 50)
# }

Run the code above in your browser using DataLab