codac 2.0.0
Loading...
Searching...
No Matches
codac2_pave.h
Go to the documentation of this file.
1
9
10#pragma once
11
12#include "codac2_Paving.h"
13#include "codac2_Ctc.h"
14#include "codac2_Sep.h"
16#include "codac2_BoolInterval.h"
17
18namespace codac2
19{
20 // eps: accuracy of the paving algorithm, the undefined boxes will have their max_diam <= eps
21
22 PavingOut pave(const IntervalVector& x, std::shared_ptr<const CtcBase<IntervalVector>> c, double eps, bool verbose = false);
23 PavingOut pave(const IntervalVector& x, const CtcBase<IntervalVector>& c, double eps, double& time, bool verbose = false);
24 PavingOut pave(const IntervalVector& x, const CtcBase<IntervalVector>& c, double eps, bool verbose = false);
25
26 PavingInOut pave(const IntervalVector& x, std::shared_ptr<const SepBase> s, double eps, bool verbose = false);
27 PavingInOut pave(const IntervalVector& x, const SepBase& s, double eps, bool verbose = false);
28
29 PavingInOut regular_pave(const IntervalVector& x, const std::function<BoolInterval(const IntervalVector&)>& test, double eps, bool verbose = false);
30
31 template<typename Y>
32 PavingInOut sivia(const IntervalVector& x, const AnalyticFunction<Y>& f, const typename Y::Domain& y, double eps, bool verbose = false)
33 {
34 return regular_pave(x,
35 [&y,&f](const IntervalVector& x)
36 {
37 auto eval = f.eval(x);
38
39 if(eval.is_subset(y))
40 return BoolInterval::TRUE;
41
42 else if(!eval.intersects(y))
43 return BoolInterval::FALSE;
44
45 else
47 },
48 eps, verbose);
49 }
50}
Definition codac2_OctaSym.h:21
Eigen::Matrix< Interval,-1, 1 > IntervalVector
Alias for a dynamic-size column vector of intervals.
Definition codac2_IntervalVector.h:25
BoolInterval
Enumeration representing a boolean interval.
Definition codac2_BoolInterval.h:26
@ UNKNOWN
Definition codac2_BoolInterval.h:32