18 template<
typename Y,
typename X=IntervalVector>
19 class CtcInverseNotIn :
public CtcUnion<X>
23 CtcInverseNotIn(
const AnalyticFunction<
typename ValueType<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>)
34 f_codomain = f.eval(IntervalVector(f.args()[0]->size()));
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 ValueType<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);