18 template<
typename Y,
typename X=IntervalVector>
19 class CtcInverseNotIn :
public CtcUnion<X>
23 CtcInverseNotIn(
const AnalyticFunction<
typename ExprType<Y>::Type>& f,
const Y& y,
bool with_centered_form =
true)
24 : CtcUnion<X>(f.args()[0]->size() )
26 assert_release(f.args().size() == 1 &&
"f must have only one arg");
27 const bool is_not_in =
true;
31 if constexpr(std::is_same_v<X,Interval>)
32 f_codomain = f.eval(Interval());
33 else if constexpr(std::is_same_v<X,IntervalVector>)
36 std::cout <<
"CtcInverseNotIn: matrices expressions not (yet) supported" << std::endl;
38 for(
const auto& complem_y : y.complementary())
40 Y w = complem_y & f_codomain;
41 if(!w.is_empty() && !w.is_subset(y))
42 *
this |= CtcInverse<Y,X>(f, complem_y, with_centered_form, is_not_in);
47 requires IsCtcBaseOrPtr<C,Y>
48 CtcInverseNotIn(
const AnalyticFunction<
typename ExprType<Y>::Type>& f,
const C& ctc_compl,
bool with_centered_form =
true)
49 : CtcUnion<X>(f.args()[0]->size() )
51 assert_release(f.args().size() == 1 &&
"f must have only one arg");
52 const bool is_not_in =
true;
54 *
this |= CtcInverse<Y,X>(f, ctc_compl, with_centered_form, is_not_in);
57 void contract(X& x)
const
59 CtcUnion<X>::contract(x);
68 CtcInverseNotIn(
const AnalyticFunction<ScalarType>&, std::initializer_list<double>,
bool =
true,
bool =
false) ->
69 CtcInverseNotIn<Interval,IntervalVector>;
72 CtcInverseNotIn(
const AnalyticFunction<ScalarType>&, std::initializer_list<Y>,
bool =
true,
bool =
false) ->
73 CtcInverseNotIn<Interval,IntervalVector>;
75 CtcInverseNotIn(
const AnalyticFunction<ScalarType>&,
const Interval&,
bool =
true,
bool =
false) ->
76 CtcInverseNotIn<Interval,IntervalVector>;
78 CtcInverseNotIn(
const AnalyticFunction<ScalarType>&,
double,
bool =
true,
bool =
false) ->
79 CtcInverseNotIn<Interval,IntervalVector>;
82 requires IsCtcBaseOrPtr<C,Interval>
83 CtcInverseNotIn(
const AnalyticFunction<ScalarType>&,
const C&,
bool =
true,
bool =
false) ->
84 CtcInverseNotIn<Interval,IntervalVector>;
88 CtcInverseNotIn(
const AnalyticFunction<VectorType>&, std::initializer_list<double>,
bool =
true,
bool =
false) ->
89 CtcInverseNotIn<IntervalVector,IntervalVector>;
91 CtcInverseNotIn(
const AnalyticFunction<VectorType>&, std::initializer_list<std::initializer_list<double>>,
bool =
true,
bool =
false) ->
92 CtcInverseNotIn<IntervalVector,IntervalVector>;
94 CtcInverseNotIn(
const AnalyticFunction<VectorType>&,
const Vector&,
bool =
true,
bool =
false) ->
95 CtcInverseNotIn<IntervalVector,IntervalVector>;
97 CtcInverseNotIn(
const AnalyticFunction<VectorType>&,
const IntervalVector&,
bool =
true,
bool =
false) ->
98 CtcInverseNotIn<IntervalVector,IntervalVector>;
100 template<
typename OtherDerived>
101 requires (OtherDerived::RowsAtCompileTime == -1 && OtherDerived::ColsAtCompileTime == 1)
102 CtcInverseNotIn(
const AnalyticFunction<VectorType>&,
const Eigen::MatrixBase<OtherDerived>&,
bool =
true,
bool =
false) ->
103 CtcInverseNotIn<IntervalVector,IntervalVector>;
106 requires IsCtcBaseOrPtr<C,IntervalVector>
107 CtcInverseNotIn(
const AnalyticFunction<VectorType>&,
const C&,
bool =
true,
bool =
false) ->
108 CtcInverseNotIn<IntervalVector,IntervalVector>;
112 CtcInverseNotIn(
const AnalyticFunction<MatrixType>&, std::initializer_list<std::initializer_list<double>>,
bool =
true,
bool =
false) ->
113 CtcInverseNotIn<IntervalMatrix,IntervalVector>;
115 CtcInverseNotIn(
const AnalyticFunction<MatrixType>&, std::initializer_list<std::initializer_list<std::initializer_list<double>>>,
bool =
true,
bool =
false) ->
116 CtcInverseNotIn<IntervalMatrix,IntervalVector>;
118 template<
typename OtherDerived>
119 requires (OtherDerived::RowsAtCompileTime == -1 && OtherDerived::ColsAtCompileTime == -1)
120 CtcInverseNotIn(
const AnalyticFunction<MatrixType>&,
const Eigen::MatrixBase<OtherDerived>&,
bool =
true,
bool =
false) ->
121 CtcInverseNotIn<IntervalMatrix,IntervalVector>;
124 requires IsCtcBaseOrPtr<C,IntervalMatrix>
125 CtcInverseNotIn(
const AnalyticFunction<MatrixType>&,
const C&,
bool =
true,
bool =
false) ->
126 CtcInverseNotIn<IntervalMatrix,IntervalVector>;
Interval class, for representing closed and connected subsets of .
Definition codac2_Interval.h:49
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