#include <HcalCubicInterpolator.h>
|
typedef std::tuple< double,
double, double > | Triple |
|
|
template<class Archive > |
void | serialize (Archive &ar, unsigned) |
|
Definition at line 17 of file HcalCubicInterpolator.h.
HcalCubicInterpolator::HcalCubicInterpolator |
( |
| ) |
|
HcalCubicInterpolator::HcalCubicInterpolator |
( |
const std::vector< Triple > & |
points | ) |
|
|
explicit |
HcalCubicInterpolator::~HcalCubicInterpolator |
( |
| ) |
|
|
inlineoverride |
Definition at line 74 of file HcalCubicInterpolator.cc.
References abscissae_, derivatives_, Exception, HcalCubicInterpolator(), mps_fire::i, AbsHcalFunctor::isStrictlyDecreasing(), AbsHcalFunctor::isStrictlyIncreasing(), and values_.
75 const bool monotonous =
79 "In HcalCubicInterpolator::inverse:"
80 " can't invert non-monotonous functor");
82 std::vector<Triple> points;
84 for (std::size_t
i = 0;
i < sz; ++
i) {
88 "In HcalCubicInterpolator::inverse:"
89 " can't invert functor with derivatives of 0");
std::tuple< double, double, double > Triple
std::vector< double > abscissae_
static bool isStrictlyIncreasing(Iter begin, Iter const end)
static bool isStrictlyDecreasing(Iter begin, Iter const end)
std::vector< double > values_
std::vector< double > derivatives_
bool HcalCubicInterpolator::isEqual |
( |
const AbsHcalFunctor & |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
double HcalCubicInterpolator::operator() |
( |
double |
x | ) |
const |
|
overridevirtual |
Implements AbsHcalFunctor.
Definition at line 31 of file HcalCubicInterpolator.cc.
References abscissae_, derivatives_, PVValHelper::dx, mps_fire::result, submitPVValidationJobs::t, cuda_std::upper_bound(), values_, and x.
36 const std::size_t szm1 = sz - 1;
43 const std::size_t cellp1 = cell + 1;
45 const double t = (
x - abscissae_[cell]) / dx;
46 const double onemt = 1.0 -
t;
47 const double h00 = onemt * onemt * (1.0 + 2.0 *
t);
48 const double h10 = onemt * onemt *
t;
49 const double h01 = t * t * (3.0 - 2.0 *
t);
50 const double h11 = t * t * onemt;
std::vector< double > abscissae_
__host__ __device__ constexpr RandomIt upper_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
std::vector< double > values_
std::vector< double > derivatives_
template<class Archive >
void HcalCubicInterpolator::serialize |
( |
Archive & |
ar, |
|
|
unsigned |
|
|
) |
| |
|
inlineprivate |
double HcalCubicInterpolator::xmax |
( |
| ) |
const |
|
overridevirtual |
double HcalCubicInterpolator::xmin |
( |
| ) |
const |
|
overridevirtual |
friend class boost::serialization::access |
|
friend |
std::vector<double> HcalCubicInterpolator::abscissae_ |
|
private |
std::vector<double> HcalCubicInterpolator::derivatives_ |
|
private |
std::vector<double> HcalCubicInterpolator::values_ |
|
private |