Go to the documentation of this file.
7 const double x0,
const double x1,
const double y0,
const double y1,
const double x) {
8 return y0 + (
y1 - y0) * ((
x - x0) / (
x1 - x0));
12 : leftExtrapolationLinear_(
false), rightExtrapolationLinear_(
false) {}
18 const std::size_t sz =
points.size();
20 std::vector<std::pair<double, double> >
tmp(
points);
21 std::sort(
tmp.begin(),
tmp.end());
24 for (std::size_t
i = 0;
i < sz; ++
i) {
30 "In HcalPiecewiseLinearFunctor constructor:"
31 " abscissae must not coincide");
40 const std::size_t szm1 = sz - 1;
68 "In HcalPiecewiseLinearFunctor::inverse:"
69 " can't invert non-monotonous functor");
71 std::vector<std::pair<double, double> >
points;
73 for (std::size_t
i = 0;
i < sz; ++
i)
static bool isStrictlyDecreasing(Iter begin, Iter const end)
std::vector< double > abscissae_
bool rightExtrapolationLinear_
HcalPiecewiseLinearFunctor()
U second(std::pair< T, U > const &p)
bool isStrictlyMonotonous() const
static double interpolateSimple(const double x0, const double x1, const double y0, const double y1, const double x)
std::vector< double > values_
static bool isStrictlyIncreasing(Iter begin, Iter const end)
bool leftExtrapolationLinear_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
__host__ constexpr __device__ RandomIt upper_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
double xmin() const override
HcalPiecewiseLinearFunctor inverse() const
double xmax() const override
double operator()(double x) const override