31 template <
typename T,
int D,
int K>
35 typedef adoreMatrix<T,D,1>
Tvec;
69 sortset_.push_back(std::make_pair(i,value));
82 for(
int i=0;i<D;i++)
aggvec_(i)=(T)0;
83 for(
int j=remstart;j<=remend;j++)
111 template<
typename T,
int D,
int K>
114 static_assert(d<D,
"right hand side dimensions must be smaller or equal to left hand side dimensions");
115 assert(
right.nc()<=K);
116 dlib::set_subm(
left.generators_,
117 dlib::range(0,
right.nr()-1),
119 for(
int i=
right.nr();i<D;i++)
123 left.generators_(i,j)=(T)0;
133 template<
typename T,
int D,
int K>
136 static_assert(d<D,
"right hand side dimensions must be smaller or equal to left hand side dimensions");
137 static_assert(k<=K,
"operator<< requires right hand side to have smaller or equal maximum number of generators");
138 dlib::set_subm(
left.generators_,
141 dlib::colm(
right.generators_,dlib::range(0,
right.n_-1));
146 left.generators_(i,j)=(T)0;
158 static_assert(k<=K,
"operator+= requires right hand side to have smaller or equal maximum number of generators");
159 this->center_ = 0.5*(this->center_+
right.center_);
160 dlib::set_colm(this->generators_,this->n_) =
right.center_-this->
center_;
161 dlib::set_colm(this->generators_,dlib::range(this->n_+1,this->n_+
right.n_))=
162 dlib::colm(this->generators_,dlib::range(0,
right.n_-1));
163 this->n_+=
right.n_+1;
170 template<
typename T,
int D,
int K,
int k>
181 this->center_ += offset;
187 template<
typename T,
int D,
int K>
196 template<
typename T,
int D,
int K>
207 this->center_ = A*this->
center_;
208 dlib::set_colm(this->generators_,dlib::range(0,this->n_-1))=
209 A*dlib::colm(this->generators_,dlib::range(0,this->n_-1));
215 template<
typename T,
int D,
int K>
227 assert(A.nc()==D && A.nr()==D)
228 this->center_ = A*this->
center_;
229 dlib::set_colm(this->generators_,dlib::range(0,this->n_-1))=
230 A*dlib::colm(this->generators_,dlib::range(0,this->n_-1));
236 template<
typename T,
int D,
int K>
250 dlib::set_rowm(
generators_,dlib::range(rstart,rend)) =
251 A * dlib::rowm(
generators_,dlib::range(0,rstart-1));
271 template<T,
int nx,
int nu,
int nd,
int K,
int Km,
int Kd>
274 const adoreMatrix<T,nx+nu+nd,nx+nu+nd>& AdBdCd,
275 const adoreMatrix<T,nx,nu>& Kfb,
280 const adoreMatrix<T,nx+nu,nx+nu>& AdBd = dlib::subm(AdBdCd,
281 dlib::range(0,nx+nu-1),dlib::range(0,nx+nu-1));
283 const adoreMatrix<T,nx,nu>& Bd = dlib::subm(AdBdCd,
284 dlib::range(0,nx-1),dlib::range(nx,nx+nu-1));
286 const adoreMatrix<T,nx,nx>& Cd = dlib::subm(AdBdCd,
287 dlib::range(0,nx-1),dlib::range(nx+nu,nx+nu+nd-1));
Definition: zonotope.h:33
const adoreMatrix< T, D, 0 > & getGenerators() const
Definition: zonotope.h:257
int n_
Definition: zonotope.h:44
Tvecset sortbuf_
Definition: zonotope.h:42
adoreMatrix< T, D, 1 > Tvec
Definition: zonotope.h:35
Tvec center_
Definition: zonotope.h:39
friend Zonotope< T, D, K > operator+(Zonotope< T, D, K > z, const adoreMatrix< T, D, 1 > &offset)
Definition: zonotope.h:188
Tvecset generators_
Definition: zonotope.h:40
friend Zonotope< T, D, K > operator*(const adoreMatrix< T, D, D > &A, Zonotope< T, D, K > z)
Definition: zonotope.h:216
friend Zonotope< T, D, K > & operator<<(Zonotope< T, D, K > &left, const adoreMatrix< T, d, 0 > &right)
Definition: zonotope.h:112
void reduce(int n)
Definition: zonotope.h:55
Zonotope()
Definition: zonotope.h:50
Zonotope< T, D, K > & operator+=(const adoreMatrix< T, D, 1 > &offset)
Definition: zonotope.h:179
Zonotope< T, D, K > & operator+=(const Zonotope< T, D, k > &right)
Definition: zonotope.h:156
Tsortset sortset_
Definition: zonotope.h:41
Zonotope< T, D, K > & operator*=(const adoreMatrix< T, D, D > &A)
Definition: zonotope.h:205
Zonotope< T, D, K > & stack_below(const adoreMatrix< T, 0, 0 > &A)
Definition: zonotope.h:245
std::vector< Tsortpair > Tsortset
Definition: zonotope.h:38
friend Zonotope< T, D, K > operator*(const adoreMatrix< T, 0, 0 > &A, Zonotope< T, D, K > z)
Definition: zonotope.h:237
friend Zonotope< T, D, K > operator+(Zonotope< T, D, K > left, const Zonotope< T, D, k > &right)
Definition: zonotope.h:171
friend Zonotope< T, D, K > operator+(const adoreMatrix< T, D, 1 > &offset, Zonotope< T, D, K > z)
Definition: zonotope.h:197
friend void linear_step(Zonotope< T, nx+nu, K > &Zxu, const adoreMatrix< T, nx+nu+nd, nx+nu+nd > &AdBdCd, const adoreMatrix< T, nx, nu > &Kfb, const Zonotope< T, nx, Km > &Zm, const Zonotope< T, nd, Kd > &Zd)
Definition: zonotope.h:272
friend Zonotope< T, D, K > & operator<<(Zonotope< T, D, K > &left, const Zonotope< T, d, k > &right)
Definition: zonotope.h:134
adoreMatrix< T, D, K *2+1 > Tvecset
Definition: zonotope.h:36
Zonotope< T, D, K > & operator*=(const adoreMatrix< T, 0, 0 > &A)
Definition: zonotope.h:225
Tvec aggvec_
Definition: zonotope.h:43
std::pair< int, T > Tsortpair
Definition: zonotope.h:37
@ right
Definition: indicator_hint.h:36
@ left
Definition: indicator_hint.h:35
z
Definition: adore_set_goal.py:32
Definition: areaofeffectconverter.h:20