gen_cube: Generator function for hypercubes

View source: R/gen_cube.R

gen_cubeR Documentation

Generator function for hypercubes

Description

This function generates the d-dimensional unit hypercube [-1,1]^d in H- or V-representation.

Usage

gen_cube(dimension, representation = "H")

Arguments

dimension

The dimension of the hypercube

representation

A string to declare the representation. It has to be 'H' for H-representation or 'V' for V-representation. Default valus is 'H'.

Value

A polytope class representing the unit d-dimensional hypercube in H- or V-representation.

Examples

# generate a 10-dimensional hypercube in H-representation
P = gen_cube(10, 'H')

# generate a 15-dimension hypercube in V-representation
P = gen_cube(5, 'V')

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