7 const double x0,
const double step,
8 const double y0,
const double y1,
11 return y0 + (y1 - y0)*((x - x0)/
step);
15 : xmin_(0.), xmax_(0.),
16 leftExtrapolationLinear_(
false), rightExtrapolationLinear_(
false)
21 const std::vector<double>&
values,
22 const double ixmin,
const double ixmax,
32 throw cms::Exception(
"In HcalInterpolatedTableFunctor constructor:" 33 " insufficient number of points");
35 throw cms::Exception(
"In HcalInterpolatedTableFunctor constructor:" 36 " invalid min and/or max coordinates");
42 const std::size_t sz =
values_.size();
43 const std::size_t szm1 = sz - 1;
63 const std::size_t ux =
static_cast<std::size_t
>((x -
xmin_)/step);
83 " can't invert non-monotonous functor");
84 const std::size_t sz =
values_.size();
85 const std::size_t szm1 = sz - 1;
87 std::vector<std::pair<double, double> >
points;
89 for (std::size_t
i=0;
i<sz; ++
i)
92 points.push_back(std::make_pair(
values_[
i], x));
static double interpolateStep(const double x0, const double step, const double y0, const double y1, const double x)
HcalInterpolatedTableFunctor()
HcalPiecewiseLinearFunctor inverse() const
static bool isStrictlyIncreasing(Iter begin, Iter const end)
bool rightExtrapolationLinear_
static bool isStrictlyDecreasing(Iter begin, Iter const end)
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
double operator()(double x) const override
bool isStrictlyMonotonous() const
bool leftExtrapolationLinear_
std::vector< double > values_