Zonotopes

Main author: Maël Godard

The following classes represent zonotopes.

Zonotope

A zonotope is a convex and symmetric polytope. It can be represented as the Minkowski sum of a finite number of line segments, which are called its generators.

In Codac, zonotopes are represented by the class Zonotope. A zonotope is defined by its center and its generators. The center is a Vector, noted \(z\), and the generators are stored in a Matrix, noted \(A\). Each column of the matrix corresponds to a generator.

The resulting zonotope is:

\[Z = z + A \cdot [-1,1]^m\]

Where \(m\) is the number of generators (i.e., the number of columns of the matrix \(A\)).

For example, let us consider the following zonotope in \(\mathbb{R}^2\):

\[\begin{split}Z = \left(\begin{array}{c} 1\\ 2\\ \end{array}\right) + \left(\begin{array}{ccc} 1 & 0 & 2 \\ 0 & 1 & 1 \end{array}\right) \cdot [-1,1]^3\end{split}\]

It can be constructed in Codac as follows:

z = Vector([1,2])
A = Matrix([[1,0,2],[0,1,1]])

Z = Zonotope(z, A)

The resulting zonotope is represented in the figure below:

../../_images/zonotope.png

Additional methods are provided to handle zonotopes.

  • box(): gives the bounding box of the zonotope. Returns an IntervalVector.

  • proj(v): Projects the zonotope on a given subspace, defined by the vector of indices v (std::vector<Index>). Returns a Zonotope.

Parallelepiped

A parallelepiped is a special case of zonotope, where the number of generators is equal or less than the dimension of the space.

It inherits from the Zonotope class, and thus has the same properties and methods. In addition, it defines the following methods:

  • vertices(): gives the vertices of the parallelepiped. Returns a std::vector<Vector>.

  • contains(v): checks if the point v is contained in the parallelepiped. Returns a BoolInterval. The matrix A must be invertible

  • is_superset(x): checks if the parallelepiped is a superset of the IntervalVector x. Returns a BoolInterval. The matrix A must be invertible