11#ifndef __CODAC_TUBEPOLYNOMIALSYNTHESIS_H__
12#define __CODAC_TUBEPOLYNOMIALSYNTHESIS_H__
22#define POLYNOMIAL_ORDER 2
29 std::array<double,POLYNOMIAL_ORDER+1> coeff;
32 Interval f(
const Interval& t)
const
35 for(
int i = 0 ; i < POLYNOMIAL_ORDER+1 ; i++)
36 x += coeff[i]*
pow(t,i);
41 struct PolynomialFactoredForm
47 Interval f(
const Interval& t)
const
49 return c*
sqr(t-a) + b + offset;
55 class TubePolynomialTreeSynthesis
59 TubePolynomialTreeSynthesis(
const Tube& x,
const Interval& tdomain,
bool upper_bound,
double eps, VIBesFigTube& m_fig);
60 ~TubePolynomialTreeSynthesis();
61 Interval operator()(
const Interval& t)
const;
66 Polynomial polyfit(
const std::vector<double> &t,
const std::vector<double> &v)
const;
67 void get_bounds(
const Interval& tdomain,
bool upper_bound, std::vector<double>& t, std::vector<double>& v)
const;
68 Trajectory traj_from_polynom(
const PolynomialFactoredForm& p)
const;
69 PolynomialFactoredForm polynomial_factoredform(
bool upper_bound)
const;
74 const Tube& m_tube_ref;
75 const Interval m_tdomain;
77 PolynomialFactoredForm m_p;
79 TubePolynomialTreeSynthesis *m_left =
nullptr, *m_right =
nullptr;
83 class TubePolynomialSynthesis
87 TubePolynomialSynthesis(
const Tube& x,
double eps);
88 ~TubePolynomialSynthesis();
89 Interval operator()(
const Interval& t)
const;
95 std::pair<TubePolynomialTreeSynthesis,TubePolynomialTreeSynthesis> m_trees;
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9
const Trajectory pow(const Trajectory &x, int p)
const Trajectory sqr(const Trajectory &x)