codac 2.0.5
Loading...
Searching...
No Matches
codac2_Zonotope.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include <vector>
13#include "codac2_Vector.h"
14#include "codac2_Matrix.h"
16
17namespace codac2
18{
28 {
29 public:
30
37 Zonotope(const Vector& c, const Matrix& A);
38
46 static Zonotope empty(Index n);
47
53 bool is_empty() const;
54
58 void set_empty();
59
65
66 Index size() const { return c.size(); }
67
74
82 Zonotope proj(const std::vector<Index>& indices) const;
83
91 Zonotope operator+(const Zonotope& zonotope);
92
97
102
106 bool empty_flag = false;
107 };
108
116 std::ostream& operator<<(std::ostream& str, const Zonotope& z);
117}
Class representing a zonotope .
Definition codac2_Zonotope.h:28
Zonotope operator+(const Zonotope &zonotope)
Computes the Minkowski sum of this Zonotope with another Zonotope.
bool empty_flag
Flag indicating whether the zonotope is empty.
Definition codac2_Zonotope.h:106
Index size() const
Outputs the size of the zonotope.
Definition codac2_Zonotope.h:66
void set_empty()
Sets the zonotope to be empty.
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.
IntervalVector box() const
Computes the axis-aligned bounding box of the zonotope.
static Zonotope empty(Index n)
Constructs an empty n-zonotope.
Vector c
Center of the zonotope.
Definition codac2_Zonotope.h:96
Zonotope proj(const std::vector< Index > &indices) const
Projects the Zonotope onto the subspace defined by the given indices.
Matrix A
Shape matrix of the zonotope.
Definition codac2_Zonotope.h:101
Definition codac2_OctaSym.h:21
Eigen::Matrix< double,-1, 1 > Vector
Alias for a dynamically-sized column vector of doubles.
Definition codac2_Vector.h:24
Eigen::Matrix< Interval,-1, 1 > IntervalVector
Alias for a dynamic-size column vector of intervals.
Definition codac2_IntervalVector.h:25
std::ostream & operator<<(std::ostream &os, const BoolInterval &x)
Streams out a BoolInterval.
Definition codac2_BoolInterval.h:131
Eigen::Matrix< double,-1,-1 > Matrix
Alias for a dynamic-size matrix of doubles.
Definition codac2_Matrix.h:26