codac
codac_SepFixPoint.h
1 //============================================================================
2 // I B E X
3 // File : ibex_SepFixPoint.h
4 // Author : Benoit Desrochers
5 // Copyright : Benoit Desrochers
6 // License : See the LICENSE file
7 // Created : May 04, 2015
8 //============================================================================
9 
10 #ifndef __IBEX_SEP_FIXPOINT_H__
11 #define __IBEX_SEP_FIXPOINT_H__
12 
13 
14 #include <ibex_IntervalVector.h>
15 #include <ibex_LargestFirst.h>
16 #include <ibex_Sep.h>
17 #include <vector>
18 
19 using ibex::Sep;
20 using ibex::IntervalVector;
21 
22 // Compute the fixed point of a separator
35 namespace codac {
40 class SepFixPoint : public Sep {
41 
42 public:
53  SepFixPoint(Sep& sep, double ratio=default_ratio);
54 
58  ~SepFixPoint();
59 
66  void separate(IntervalVector &x_in, IntervalVector &x_out);
67 
68 
69 protected:
70 
74  Sep& sep;
75 
79  bool impact_cin;
84 
89  IntervalVector *first_cin_boxes;
90 
95  IntervalVector *first_cout_boxes;
96 
100  int n_in;
101 
105  int n_out;
106 
107 
113  double ratio;
114 
118  static const double default_ratio;
119 
120 private:
121 
131  void clearFlags();
140  void setCoutFlags(IntervalVector &x_out, IntervalVector &x0);
141 
150  void setCinFlags(IntervalVector &x_in, IntervalVector &x0);
151 
162  bool reconstruct(IntervalVector &x_in, IntervalVector &x_out, IntervalVector &x_old);
163 
164 };
165 
166 } // namespace pyibex
167 
168 #endif // __IBEX_SEP_FIXPOINT_H__
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition: codac_capd_helpers.h:9
bool impact_cin
backtrace if the inner contractor had an impact
Definition: codac_SepFixPoint.h:79
int n_out
number of boxes in SepFixPoint::first_cout_boxes
Definition: codac_SepFixPoint.h:105
static const double default_ratio
ratio used, set to 0.1.
Definition: codac_SepFixPoint.h:118
~SepFixPoint()
Delete *this.
void separate(IntervalVector &x_in, IntervalVector &x_out)
Separate a box.
Sep & sep
The Separator.
Definition: codac_SepFixPoint.h:74
IntervalVector * first_cout_boxes
store the first box contracted by the inner / outer contractor It is the result of the ibex function ...
Definition: codac_SepFixPoint.h:95
int n_in
number of boxes in SepFixPoint::first_cin_boxes
Definition: codac_SepFixPoint.h:100
SepFixPoint(Sep &sep, double ratio=default_ratio)
build a fix point Separator from the one given as arguments. When the Hausdorff distance between two ...
Fix point of a Separator.
Definition: codac_SepFixPoint.h:40
bool impact_cout
backtrace if the outer contractor had an impact
Definition: codac_SepFixPoint.h:83
double ratio
When the Hausdorff distance between two iterations is less than ratio*diameter the fix-point is consi...
Definition: codac_SepFixPoint.h:113
IntervalVector * first_cin_boxes
store the first box contracted by the outer contractor It is the result of the ibex function Interval...
Definition: codac_SepFixPoint.h:89