Learn R Programming

volesti (version 1.1.1)

gen_rand_zonotope: Generator function for zonotopes

Description

This function generates a random \(d\)-dimensional zonotope defined by the Minkowski sum of \(m\) \(d\)-dimensional segments. The function considers \(m\) random directions in \(R^d\). There are three strategies to pick the length of each segment: a) it is uniformly sampled from \([0,100]\), b) it is random from \(\mathcal{N}(50,(50/3)^2)\) truncated to \([0,100]\), c) it is random from \(Exp(1/30)\) truncated to \([0,100]\).

Usage

gen_rand_zonotope(dimension, nsegments, generator = NULL, seed = NULL)

Arguments

dimension

The dimension of the zonotope.

nsegments

The number of segments that generate the zonotope.

generator

The distribution to pick the length of each segment from \([0,100]\): (a) 'uniform', (b) 'gaussian' or (c) 'exponential'.

seed

Optional. A fixed seed for the generator.

Value

A polytope class representing a zonotope.

Examples

Run this code
# NOT RUN {
# generate a 10-dimensional zonotope defined by the Minkowski sum of 20 segments
P = gen_rand_zonotope(10, 20)
# }

Run the code above in your browser using DataLab