#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 |
Definition at line 10 of file HcalCubicInterpolator.cc.
References abscissae_, derivatives_, Exception, i, t, tmp, and values_.
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)
28 const std::size_t szm1 = sz - 1;
29 for (std::size_t
i=0;
i<szm1; ++
i)
32 " abscissae must not coincide");
std::vector< double > abscissae_
std::tuple< double, double, double > Triple
std::vector< double > values_
std::vector< double > derivatives_
std::vector< std::vector< double > > tmp
virtual HcalCubicInterpolator::~HcalCubicInterpolator |
( |
| ) |
|
|
inlinevirtual |
Definition at line 87 of file HcalCubicInterpolator.cc.
References abscissae_, derivatives_, Exception, HcalCubicInterpolator(), i, AbsHcalFunctor::isStrictlyDecreasing(), AbsHcalFunctor::isStrictlyIncreasing(), and values_.
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)
std::vector< double > values_
std::vector< double > derivatives_
virtual bool HcalCubicInterpolator::isEqual |
( |
const AbsHcalFunctor & |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
double HcalCubicInterpolator::operator() |
( |
double |
x | ) |
const |
|
overridevirtual |
Implements AbsHcalFunctor.
Definition at line 36 of file HcalCubicInterpolator.cc.
References abscissae_, derivatives_, mps_fire::result, t, values_, and x.
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;
std::vector< double > abscissae_
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 |