codac 2.0.0
Loading...
Searching...
No Matches
codac2::Parallelepiped Class Reference

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

#include <codac2_Parallelepiped.h>

Inheritance diagram for codac2::Parallelepiped:
Collaboration diagram for codac2::Parallelepiped:

Public Member Functions

 Parallelepiped (const Vector &z, const Matrix &A)
 Constructs a n-parallelepiped object with a given center and shape matrix.
 
std::vector< Vectorvertices () const
 Computes the vertices of the parallelepiped.
 
IntervalVector box () const
 Computes the axis-aligned bounding box of the parallelepiped.
 
BoolInterval contains (const Vector &v) const
 Checks if a given point is contained within the parallelepiped. The matrix A has to be square and invertible.
 
BoolInterval is_superset (const IntervalVector &x) const
 Checks if a given box is contained within the parallelepiped. The matrix A has to be square and invertible.
 
- Public Member Functions inherited from codac2::Zonotope
 Zonotope (const Vector &z, const Matrix &A)
 Constructs a n-zonotope object with a given center and shape matrix.
 
Zonotope proj (const std::vector< Index > &indices) const
 Projects the Zonotope onto the subspace defined by the given indices.
 

Additional Inherited Members

- Public Attributes inherited from codac2::Zonotope
Vector z
 Center of the zonotope.
 
Matrix A
 Shape matrix of the zonotope.
 

Detailed Description

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

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

A parallelepiped is a special case of a zonotope where the shape matrix \(\mathbf{A}\) has \(m\) columns with \(m \leqslant n\).

Constructor & Destructor Documentation

◆ Parallelepiped()

codac2::Parallelepiped::Parallelepiped ( const Vector & z,
const Matrix & A )

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

Parameters
zCenter of the parallelepiped (n-dimensional vector)
AShape matrix of the parallelepiped ( \(n\times m\) matrix with \(m \leqslant n\))

Member Function Documentation

◆ vertices()

std::vector< Vector > codac2::Parallelepiped::vertices ( ) const

Computes the vertices of the parallelepiped.

Returns
A vector containing the unsorted vertices of the parallelepiped

◆ box()

IntervalVector codac2::Parallelepiped::box ( ) const

Computes the axis-aligned bounding box of the parallelepiped.

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

◆ contains()

BoolInterval codac2::Parallelepiped::contains ( const Vector & v) const

Checks if a given point is contained within the parallelepiped. The matrix A has to be square and invertible.

Parameters
vThe point to check
Returns
BoolInterval true if the point is inside the parallelepiped, false if is outside, and unknown otherwise

◆ is_superset()

BoolInterval codac2::Parallelepiped::is_superset ( const IntervalVector & x) const

Checks if a given box is contained within the parallelepiped. The matrix A has to be square and invertible.

Parameters
xThe box to check
Returns
BoolInterval true if the box is inside the parallelepiped, false if is outside, and unknown otherwise

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