powered by
This function can be used to generate the \(d\)-dimensional unit hypercube \([-1,1]^d\) in H- or V-representation.
GenCube(dimension, repr)
The dimension of the hypercube
A string to declare the representation. It has to be 'H' for H-representation or 'V' for V-representation.
'H'
'V'
A polytope class representing the unit \(d\)-dimensional hypercube in H- or V-representation.
# NOT RUN { # generate a 10-dimensional hypercube in H-representation P = GenCube(10, 'H') # generate a 15-dimension hypercube in V-representation P = GenCube(15, 'V') # }
Run the code above in your browser using DataLab