11 const std::vector<Triple>&
points)
13 const std::size_t sz = points.size();
16 std::vector<Triple>
tmp(points);
17 std::sort(tmp.begin(), tmp.end());
21 for (std::size_t
i=0;
i<sz; ++
i)
25 values_.push_back(std::get<1>(t));
28 const std::size_t szm1 = sz - 1;
29 for (std::size_t
i=0;
i<szm1; ++
i)
32 " abscissae must not coincide");
44 const std::size_t szm1 = sz - 1;
53 const std::size_t cellp1 = cell + 1;
55 const double t = (x - abscissae_[cell])/dx;
56 const double onemt = 1.0 -
t;
57 const double h00 = onemt*onemt*(1.0 + 2.0*
t);
58 const double h10 = onemt*onemt*
t;
59 const double h01 = t*t*(3.0 - 2.0*
t);
60 const double h11 = t*t*onemt;
93 " can't invert non-monotonous functor");
95 std::vector<Triple>
points;
97 for (std::size_t
i=0;
i<sz; ++
i)
102 " can't invert functor with derivatives of 0");
std::vector< double > abscissae_
std::tuple< double, double, double > Triple
static bool isStrictlyIncreasing(Iter begin, Iter const end)
static bool isStrictlyDecreasing(Iter begin, Iter const end)
double operator()(double x) const override
HcalCubicInterpolator approximateInverse() const
double xmax() const override
std::vector< double > values_
std::vector< double > derivatives_
std::vector< std::vector< double > > tmp
double xmin() const override