Learn R Programming

volesti (version 1.1.0)

gen_rand_vpoly: Generator function for random V-polytopes

Description

This function generates a \(d\)-dimensional polytope in V-representation with \(m\) vertices. We pick \(m\) random points from the boundary of the \(d\)-dimensional unit hypersphere as vertices.

Usage

gen_rand_vpoly(dimension, nvertices, generator = NULL, seed = NULL)

Arguments

dimension

The dimension of the convex polytope.

nvertices

The number of the vertices.

generator

The body that the generator samples uniformly the vertices from: (a) 'cube' or (b) 'sphere'.

seed

Optional. A fixed seed for the generator.

Value

A polytope class representing a V-polytope.

Examples

Run this code
# NOT RUN {
# generate a 10-dimensional polytope defined as the convex hull of 25 random vertices
P = gen_rand_vpoly(10, 25)
# }

Run the code above in your browser using DataLab