gen_rand_hpoly: Generator function for random H-polytopes

View source: R/gen_rand_hpoly.R

gen_rand_hpolyR Documentation

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, 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

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

volesti documentation built on Sept. 19, 2023, 5:08 p.m.