codac 2.0.0
Loading...
Searching...
No Matches
codac2_CtcWrapper.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include "codac2_Ctc.h"
13
14namespace codac2
15{
16 template<typename Y,
17 typename X = std::conditional_t<
18 std::is_same_v<Y, Interval>,
21 class CtcWrapper : public Ctc<CtcWrapper<Y>,X>
22 {
23 public:
24
25 CtcWrapper(const Y& y)
26 : Ctc<CtcWrapper<Y>,X>(y.size()), _y(y)
27 { }
28
29 CtcWrapper(Y&& y)
30 : Ctc<CtcWrapper<Y>,X>(y.size()), _y(std::move(y))
31 { }
32
33 void contract(X& x) const
34 {
35 assert_release(x.size() == this->size());
36 x = x & _y;
37 }
38
39 protected:
40
41 const Y _y;
42 };
43}
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:50
Definition codac2_OctaSym.h:21
Eigen::Matrix< Interval,-1, 1 > IntervalVector
Alias for a dynamic-size column vector of intervals.
Definition codac2_IntervalVector.h:25