12#ifndef __CODAC_CTCUNION_H__
13#define __CODAC_CTCUNION_H__
21 class CtcUnion :
public Ctc
25 CtcUnion(
int nb_var) : Ctc(nb_var)
29 CtcUnion(
const C1& c1) : Ctc(c1.nb_var)
31 _v_ctc.push_back(std::make_shared<C1>(c1));
34 template<
typename C1,
typename... C>
35 CtcUnion(
const C1& c1,
const C&... c) : CtcUnion(c1)
37 (_v_ctc.push_back(std::make_shared<C>(c)), ...);
38 for(
const auto& ci : _v_ctc) { assert(ci->nb_var == nb_var); }
41 void contract(IntervalVector& x)
43 IntervalVector result(nb_var, Interval::empty_set());
45 for(
auto& ci : _v_ctc)
47 IntervalVector saved_x = x;
48 ci->contract(saved_x);
52 for(
auto& ci : _v_ctc_ptrs)
54 IntervalVector saved_x = x;
55 ci->contract(saved_x);
63 CtcUnion& operator|=(
const C& c)
65 assert(c.nb_var == nb_var);
66 _v_ctc.push_back(std::make_shared<C>(c));
70 CtcUnion& add_raw_ptr(Ctc *c)
72 _v_ctc_ptrs.push_back(c);
78 std::vector<std::shared_ptr<Ctc>> _v_ctc;
79 std::vector<Ctc*> _v_ctc_ptrs;
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9