gen_rand_hpoly: Generator function for random H-polytopes

Description Usage Arguments Value Examples

View source: R/gen_rand_hpoly.R

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

1
gen_rand_hpoly(dimension, nfacets, generator = list(constants = "sphere"))

Arguments

dimension

The dimension of the convex polytope.

nfacets

The number of the facets.

generator

A list that could contain two elements.

  • constants To declare how to set the constants b_i for each facets: (i) 'sphere', each hyperplane is tangent to the hypersphere of radius 10, (ii) 'uniform' for each b_i the generator picks a uniform number from (0,1). The defalut value is 'sphere'.

  • seed Optional. A fixed seed for the number generator.

Value

A polytope class representing a H-polytope.

Examples

1
2
# generate a 10-dimensional polytope with 50 facets
P = gen_rand_hpoly(10, 50)

volesti documentation built on July 14, 2021, 5:11 p.m.