54 requires std::is_same_v<T,Interval> || std::is_same_v<T,IntervalVector>
56 contract_impl<T>(t,z,x,v,
nullptr);
85 requires std::is_same_v<T,Interval> || std::is_same_v<T,IntervalVector>
87 assert_release(x.tdomain() == v.tdomain());
88 assert_release(primitives.first.tdomain() == v.tdomain());
89 assert_release(primitives.second.tdomain() == v.tdomain());
90 contract_impl(t,z,x,v,&primitives);
100 assert_release(x.
size() == v.
size());
101 assert_release(z.size() == x.
size());
125 auto it_t_beg = x.
tdomain()->sample(t.
lb(),
true);
126 auto it_t = it_t_beg;
127 auto it_t_end = std::next(x.
tdomain()->sample(t.
ub(),
true));
130 while(it_t != it_t_end)
137 auto it_t1 = it_t_beg;
138 auto it_t1_end = it_t_end;
139 while(it_t1 != it_t1_end)
143 T y1 = x(it_t1->lb()) & z;
151 y1 += v.
integral(Interval(it_t1->lb()),Interval(it_t->lb()),*primitives);
153 y1 += v.
integral(Interval(it_t1->lb()),Interval(it_t->lb()));
163 x.
slice(it_t)->set(slices_union);
169 CtcDeriv ctc_deriv(TimePropag::FWD_BWD,
true);
170 ctc_deriv.restrict_tdomain(t);
171 ctc_deriv.contract(x,v);
void contract(Interval &t, T &z, SlicedTube< T > &x, const SlicedTube< T > &v) const
: contracts the observation and the tube subject to and .
Definition codac2_CtcEval.h:53
CtcEval()
Creates the evaluation contractor .
Definition codac2_CtcEval.h:37
void contract(Interval &t, T &z, SlicedTube< T > &x, const SlicedTube< T > &v, const std::pair< SlicedTube< T >, SlicedTube< T > > &primitives) const
: contracts the observation and the tube subject to and , using precomputed partial primitives of ...
Definition codac2_CtcEval.h:83
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:50
bool is_empty() const
Tests if this is empty.
Definition codac2_Interval_impl.h:221
double ub() const
Returns the upper bound of this.
Definition codac2_Interval_impl.h:131
bool is_degenerated() const
Tests if this is degenerated, that is, in the form of .
Definition codac2_Interval_impl.h:241
void set_empty()
Sets this interval to the empty set.
Definition codac2_Interval_impl.h:216
double lb() const
Returns the lower bound of this.
Definition codac2_Interval_impl.h:126
Tube represented over a sliced temporal domain.
Definition codac2_SlicedTube.h:38
void set(const T &codomain)
Sets all codomains of this tube to the same value.
Definition codac2_SlicedTube.h:443
T empty_value() const
Returns the empty codomain value associated with T.
Definition codac2_SlicedTube.h:1225
Index size() const
Returns the codomain dimension.
Definition codac2_SlicedTube.h:163
bool is_empty() const
Tests whether this tube is empty.
Definition codac2_SlicedTube.h:315
Interval invert(const T &y) const
Returns the interval inversion .
Definition codac2_SlicedTube.h:793
std::shared_ptr< Slice< T > > slice(const std::list< TSlice >::iterator &it)
Returns the slice attached to a temporal iterator.
Definition codac2_SlicedTube.h:249
static bool are_same(const std::shared_ptr< const TDomain > &tdom1, const std::shared_ptr< const TDomain > &tdom2)
Tests whether two temporal domains share the same temporal partition.
const std::shared_ptr< TDomain > & tdomain() const
Returns the temporal domain of this tube.
Definition codac2_TubeBase.h:49
T integral(const Interval &t) const
Returns an enclosure of the integrals of this tube from to .
Definition codac2_SlicedTube_integral_impl.h:20
Definition codac2_OctaSym.h:21