codac 1.5.6
Loading...
Searching...
No Matches
codac_SepCtcPairProj.h
1//============================================================================
2// I B E X
3// File : ibex_SepCtcPairProj.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_CTCPAIR_PROJ_H__
11#define __IBEX_SEP_CTCPAIR_PROJ_H__
12
13
14
15#include <ibex_IntervalVector.h>
16#include <ibex_SepCtcPair.h>
17#include <ibex_SepFwdBwd.h>
18#include <ibex_CtcForAll.h>
19#include <ibex_CtcExist.h>
20#include <ibex_SepFwdBwd.h>
21
22#include <ibex_BitSet.h>
23
24using ibex::Ctc;
25using ibex::Sep;
26using ibex::IntervalVector;
27using ibex::CtcExist;
28using ibex::CtcForAll;
29using ibex::BitSet;
30using ibex::SepCtcPair;
31using ibex::SepFwdBwd;
32
33namespace codac {
34
40class CtcFromSep : public Ctc {
41public:
50 CtcFromSep(Sep &sep, bool return_ctc_in) : Ctc(sep.nb_var), sep(sep), return_ctc_in(return_ctc_in) {}
51
58 void contract(IntervalVector& x){
59 IntervalVector x_in(x), x_out(x);
60 sep.separate(x_in, x_out);
61 x &= ( (return_ctc_in == true) ? x_in : x_out );
62 }
63
64private:
69 Sep& sep;
70
75 bool return_ctc_in;
76};
77
78
87class SepCtcPairProj : public Sep {
88
89public:
99 SepCtcPairProj(Ctc& ctc_in, Ctc& ctc_out, const IntervalVector& y_init, double prec);
100
110 SepCtcPairProj(SepCtcPair &sep, const IntervalVector& y_init, double prec);
111
121 SepCtcPairProj(Sep &sep, const IntervalVector& y_init, double prec);
122
128
135 void separate(IntervalVector &x_in, IntervalVector &x_out);
136
137protected:
139 Ctc& ctc_in;
142
144 CtcExist *ctcExist;
145
147 CtcForAll *ctcForAll;
148
150 IntervalVector y_init;
151
153 BitSet vars;
154
155};
156
157} // namespace pyibex
158
159#endif // __IBEX_SEP_CTCPAIR_PROJ_H__
Build a contractor with a separator Wrt the.
Definition codac_SepCtcPairProj.h:40
CtcFromSep(Sep &sep, bool return_ctc_in)
Construct a new Ctc From Sep object wrt to the value of return_ctc_in it use the result from the sepa...
Definition codac_SepCtcPairProj.h:50
void contract(IntervalVector &x)
contract method call separate on the input box [x] and return x_in or x_out
Definition codac_SepCtcPairProj.h:58
projection of a separator using ibexlib algorithm
Definition codac_SepCtcPairProj.h:87
~SepCtcPairProj()
Destroy the Sep Ctc Pair Proj object.
CtcExist * ctcExist
Definition codac_SepCtcPairProj.h:144
BitSet vars
Definition codac_SepCtcPairProj.h:153
Ctc & ctc_out
Definition codac_SepCtcPairProj.h:141
CtcForAll * ctcForAll
Definition codac_SepCtcPairProj.h:147
IntervalVector y_init
Definition codac_SepCtcPairProj.h:150
void separate(IntervalVector &x_in, IntervalVector &x_out)
Separate method.
SepCtcPairProj(Ctc &ctc_in, Ctc &ctc_out, const IntervalVector &y_init, double prec)
Construct a new Sep Ctc Pair Proj object.
SepCtcPairProj(Sep &sep, const IntervalVector &y_init, double prec)
Construct a new Sep Ctc Pair Proj object build for a generic Sep Object.
SepCtcPairProj(SepCtcPair &sep, const IntervalVector &y_init, double prec)
Construct a new Sep Ctc Pair Proj object build from a SepCtcPair object.
Ctc & ctc_in
Definition codac_SepCtcPairProj.h:139
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9