7 const double x0,
const double x1,
8 const double y0,
const double y1,
11 return y0 + (y1 - y0)*((x - x0)/(x1 - x0));
15 : leftExtrapolationLinear_(
false), rightExtrapolationLinear_(
false)
20 const std::vector<std::pair<double, double> >&
points,
26 const std::size_t sz =
points.size();
29 std::vector<std::pair<double, double> >
tmp(
points);
30 std::sort(tmp.begin(), tmp.end());
33 for (std::size_t
i=0;
i<sz; ++
i)
40 " abscissae must not coincide");
52 const std::size_t szm1 = sz - 1;
93 " can't invert non-monotonous functor");
95 std::vector<std::pair<double, double> >
points;
97 for (std::size_t
i=0;
i<sz; ++
i)
virtual double operator()(double x) const override
bool leftExtrapolationLinear_
std::vector< double > abscissae_
static bool isStrictlyIncreasing(Iter begin, Iter const end)
bool isStrictlyMonotonous() const
U second(std::pair< T, U > const &p)
T x() const
Cartesian x coordinate.
virtual double xmin() const override
HcalPiecewiseLinearFunctor()
static bool isStrictlyDecreasing(Iter begin, Iter const end)
bool rightExtrapolationLinear_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
HcalPiecewiseLinearFunctor inverse() const
static double interpolateSimple(const double x0, const double x1, const double y0, const double y1, const double x)
std::vector< std::vector< double > > tmp
std::vector< double > values_
virtual double xmax() const override