12#ifndef __CODAC_DOMAIN_H__
13#define __CODAC_DOMAIN_H__
31 class ContractorNetwork;
37 enum class Type { T_INTERVAL, T_INTERVAL_VECTOR, T_SLICE, T_TUBE, T_TUBE_VECTOR };
38 enum class MemoryRef { M_DOUBLE, M_INTERVAL, M_INTERVAL_VAR, M_VECTOR, M_INTERVAL_VECTOR, M_INTERVAL_VECTOR_VAR, M_SLICE, M_TUBE, M_TUBE_VECTOR };
41 Domain(
const Domain& ad);
45 Domain(Interval& i,
double& extern_d);
46 Domain(Interval& i, Interval& extern_i);
47 Domain(
const Interval& i,
bool interm_var =
false);
48 Domain(IntervalVar& i);
51 Domain(IntervalVector& iv);
52 Domain(
const IntervalVector& iv,
bool interm_var =
false);
53 Domain(IntervalVectorVar& iv);
56 Domain(
const Tube& t,
bool interm_var =
false);
57 Domain(TubeVector& tv);
58 Domain(
const TubeVector& tv,
bool interm_var =
false);
61 const Domain& operator=(
const Domain& ad);
62 void set_ref_values(
const Domain& ad);
68 const Interval& interval()
const;
69 IntervalVector& interval_vector();
70 const IntervalVector& interval_vector()
const;
72 const Slice& slice()
const;
74 const Tube& tube()
const;
75 TubeVector& tube_vector();
76 const TubeVector& tube_vector()
const;
78 std::vector<Contractor*>& contractors();
79 const std::vector<Contractor*>& contractors()
const;
80 void add_ctc(Contractor *ctc);
83 bool is_var_not_associated()
const;
85 double compute_volume()
const;
86 double get_saved_volume()
const;
87 void set_volume(
double vol);
89 bool is_interm_var()
const;
92 bool is_empty()
const;
94 bool operator==(
const Domain& x)
const;
95 bool operator!=(
const Domain& x)
const;
97 bool is_component_of(
const Domain& x)
const;
98 bool is_component_of(
const Domain& x,
int& component_id)
const;
100 bool is_slice_of(
const Domain& x)
const;
101 bool is_slice_of(
const Domain& x,
int& slice_id)
const;
103 void add_data(
double t,
const Interval& y, ContractorNetwork& cn);
104 void add_data(
double t,
const IntervalVector& y, ContractorNetwork& cn);
106 const std::string dom_name(
const std::map<DomainHashcode,Domain*> m_domains)
const;
107 void set_name(
const std::string& name);
109 static bool all_dyn(
const std::vector<Domain>& v_domains);
110 static bool all_slices(
const std::vector<Domain>& v_domains);
111 static bool dyn_same_slicing(
const std::vector<Domain>& v_domains);
112 static int total_size(
const std::vector<Domain>& v_domains);
114 static Domain vector_component(Domain& x,
int i);
116 const std::string dom_type_str()
const;
117 friend std::ostream& operator<<(std::ostream& str,
const Domain& x);
121 Domain(Type type, MemoryRef memory_type);
122 const std::string var_name(
const std::map<DomainHashcode,Domain*> m_domains)
const;
130 std::reference_wrapper<Interval> m_ref_values_i;
131 std::reference_wrapper<IntervalVector> m_ref_values_iv;
132 std::reference_wrapper<Slice> m_ref_values_s;
133 std::reference_wrapper<Tube> m_ref_values_t;
134 std::reference_wrapper<TubeVector> m_ref_values_tv;
140 IntervalVector *m_iv_ptr;
142 TubeVector *m_tv_ptr;
147 MemoryRef m_memory_type;
151 std::reference_wrapper<double> m_ref_memory_d;
152 std::reference_wrapper<Interval> m_ref_memory_i;
153 std::reference_wrapper<IntervalVar> m_ref_memory_ivar;
154 std::reference_wrapper<Vector> m_ref_memory_v;
155 std::reference_wrapper<IntervalVector> m_ref_memory_iv;
156 std::reference_wrapper<IntervalVectorVar> m_ref_memory_ivvar;
157 std::reference_wrapper<Slice> m_ref_memory_s;
158 std::reference_wrapper<Tube> m_ref_memory_t;
159 std::reference_wrapper<TubeVector> m_ref_memory_tv;
166 Interval *m_init_i_ptr;
167 IntervalVector *m_init_iv_ptr;
169 TubeVector *m_init_tv_ptr;
174 std::map<double,double> m_map_data_s_lb, m_map_data_s_ub;
175 std::map<double,Vector> m_map_data_lb, m_map_data_ub;
177 Trajectory m_traj_lb, m_traj_ub;
179 std::vector<Contractor*> m_v_ctc;
180 double m_volume = -1.;
185 static int dom_counter;
187 friend class ContractorNetwork;
188 friend class DomainHashcode;
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9