codac 2.0.5
Loading...
Searching...
No Matches
codac2::Zonotope Class Reference

Class representing a zonotope \(\mathbf{c} + \mathbf{A}\cdot[-1,1]^m\). More...

#include <codac2_Zonotope.h>

Inheritance diagram for codac2::Zonotope:
codac2::Parallelepiped

Public Member Functions

 Zonotope (const Vector &c, const Matrix &A)
 Constructs a n-zonotope object with a given center and shape matrix.
bool is_empty () const
 Checks if the zonotope is empty.
void set_empty ()
 Sets the zonotope to be empty.
Index size () const
 Outputs the size of the zonotope.
IntervalVector box () const
 Computes the axis-aligned bounding box of the zonotope.
Zonotope proj (const std::vector< Index > &indices) const
 Projects the Zonotope onto the subspace defined by the given indices.
Zonotope operator+ (const Zonotope &zonotope)
 Computes the Minkowski sum of this Zonotope with another Zonotope.

Static Public Member Functions

static Zonotope empty (Index n)
 Constructs an empty n-zonotope.

Public Attributes

Vector c
 Center of the zonotope.
Matrix A
 Shape matrix of the zonotope.
bool empty_flag = false
 Flag indicating whether the zonotope is empty.

Detailed Description

Class representing a zonotope \(\mathbf{c} + \mathbf{A}\cdot[-1,1]^m\).

This class represents a zonotope in n-dimensional space, defined by a center point \(\mathbf{c}\) and a shape matrix \(\mathbf{A}\).

The vector \(\mathbf{c}\) and each column of the matrix \(\mathbf{A}\) must have the same dimension \(n\), but the matrix \(\mathbf{A}\) can have any number of columns \(m\).

Constructor & Destructor Documentation

◆ Zonotope()

codac2::Zonotope::Zonotope ( const Vector & c,
const Matrix & A )

Constructs a n-zonotope object with a given center and shape matrix.

Parameters
cCenter of the zonotope (n-dimensional vector)
AShape matrix of the zonotope ( \(n\times m\) matrix)

Member Function Documentation

◆ empty()

Zonotope codac2::Zonotope::empty ( Index n)
static

Constructs an empty n-zonotope.

Parameters
nDimension of the zonotope
Returns
A new Zonotope object representing an empty zonotope in n-dimensional space

◆ is_empty()

bool codac2::Zonotope::is_empty ( ) const

Checks if the zonotope is empty.

Returns
True if the zonotope is empty, false otherwise

◆ size()

Index codac2::Zonotope::size ( ) const
inline

Outputs the size of the zonotope.

Returns
The size of the zonotope, defined as the size of its center vector
66{ return c.size(); }
Vector c
Center of the zonotope.
Definition codac2_Zonotope.h:96

◆ box()

IntervalVector codac2::Zonotope::box ( ) const

Computes the axis-aligned bounding box of the zonotope.

Returns
An IntervalVector representing the axis-aligned bounding box of the zonotope

◆ proj()

Zonotope codac2::Zonotope::proj ( const std::vector< Index > & indices) const

Projects the Zonotope onto the subspace defined by the given indices.

Parameters
indicesVector of indices of the dimensions to project onto
Returns
A new Zonotope object representing the projection of the Zonotope onto the specified subspace

◆ operator+()

Zonotope codac2::Zonotope::operator+ ( const Zonotope & zonotope)

Computes the Minkowski sum of this Zonotope with another Zonotope.

Parameters
zonotopeThe other Zonotope to add to this one
Returns
A new Zonotope object representing the Minkowski sum of the two Zonotopes

The documentation for this class was generated from the following file: