![]() |
APFEL 4.8.0
A PDF evolution library in C++
|
The Interpolator class is a mother class for the x-space interpolationand requires the implementation of a specialized interpolation algorithm. The current version uses the joint grid object stored allocated by the Grid class. More...
#include <interpolator.h>
Public Member Functions | |
virtual | ~Interpolator ()=default |
Interpolator (Grid const &gr) | |
The Interpolator constructor. | |
Interpolator (Grid const &gr, std::vector< std::vector< double > > const &distsubgrid, std::vector< double > const &distjointgrid) | |
The Interpolator constructor. | |
virtual double | InterpolantLog (int const &beta, double const &lnx, SubGrid const &sg) const =0 |
Pure virtual method for the interpolating functions polynomial in log(x). | |
virtual double | Interpolant (int const &beta, double const &x, SubGrid const &sg) const =0 |
Pure virtual method for the interpolating functions. | |
virtual double | DerInterpolant (int const &, double const &, SubGrid const &) const |
Virtual method for the derivative of the interpolating functions. | |
virtual double | IntInterpolant (int const &, double const &, double const &, SubGrid const &) const |
Virtual method for the integral of the interpolating functions. | |
virtual std::array< int, 2 > | SumBounds (double const &x, SubGrid const &sg) const =0 |
This purely virtual function computes the lower and upper bounds on which the the sum over interpolants is limited. | |
Evaluate functions | |
List of functions that perform the interpolation on the x-space grid. These also include the derivative and the integral of the interpolated function. | |
double | Evaluate (double const &x) const |
Function that evaluates the interpolated function on the joint grid. | |
double | Evaluate (double const &x, int const &ig) const |
Function that evaluates the interpolated function on a given subgrid. | |
double | Derive (double const &x) const |
Function that evaluates the derivative of the interpolated function on the joint grid. | |
double | Integrate (double const &a, double const &b) const |
Function that evaluates the integral of the interpolated function in the interval [a,b] on the joint grid. | |
Getters | |
Grid const & | GetGrid () const |
The grid. | |
std::vector< std::vector< double > > const & | GetDistributionSubGrid () const |
The distribution on the subgrids. | |
std::vector< double > const & | GetDistributionJointGrid () const |
The distribution on the joint grid. | |
void | Print () const |
Print the Interpolator object. | |
Protected Attributes | |
Grid const & | _grid |
The stored grid reference. | |
std::vector< std::vector< double > > | _distributionSubGrid |
The array with the distribution values on the subgrid. | |
std::vector< double > | _distributionJointGrid |
The array with the distribution values on the joint grid. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, Interpolator const &sg) |
Method which prints Interpolator with cout <<. This only prints the first subgrid and is supposed to be used for debugging purposes. | |
The Interpolator class is a mother class for the x-space interpolationand requires the implementation of a specialized interpolation algorithm. The current version uses the joint grid object stored allocated by the Grid class.
|
virtualdefault |
apfel::Interpolator::Interpolator | ( | Grid const & | gr | ) |
The Interpolator constructor.
gr | the x-space grid object over which interpolation takes place |
apfel::Interpolator::Interpolator | ( | Grid const & | gr, |
std::vector< std::vector< double > > const & | distsubgrid, | ||
std::vector< double > const & | distjointgrid ) |
The Interpolator constructor.
gr | the x-space grid object over which interpolation takes place |
distsubgrid | the vector of subgrids |
distjointgrid | the joint subgrid |
|
inlinevirtual |
Virtual method for the derivative of the interpolating functions.
Reimplemented in apfel::LagrangeInterpolator.
double apfel::Interpolator::Derive | ( | double const & | x | ) | const |
Function that evaluates the derivative of the interpolated function on the joint grid.
x | the value in x where the derivative has to be computed |
double apfel::Interpolator::Evaluate | ( | double const & | x | ) | const |
Function that evaluates the interpolated function on the joint grid.
x | the value in x to be interpolated |
double apfel::Interpolator::Evaluate | ( | double const & | x, |
int const & | ig ) const |
Function that evaluates the interpolated function on a given subgrid.
x | the value in x to be interpolated |
ig | the subgrid index |
|
inline |
The distribution on the joint grid.
|
inline |
The distribution on the subgrids.
|
inline |
The grid.
double apfel::Interpolator::Integrate | ( | double const & | a, |
double const & | b ) const |
Function that evaluates the integral of the interpolated function in the interval [a,b] on the joint grid.
a | the lower integration bound |
b | the upper integration bound |
|
pure virtual |
Pure virtual method for the interpolating functions.
beta | the x-space grid index |
x | the value of the interpolation point |
sg | the SubGrid over which the interpolant is defined |
Implemented in apfel::LagrangeInterpolator.
|
pure virtual |
Pure virtual method for the interpolating functions polynomial in log(x).
beta | the x-space grid index |
lnx | the value (of the log) of the interpolation point |
sg | the SubGrid over which the interpolant is defined |
Implemented in apfel::LagrangeInterpolator.
|
inlinevirtual |
Virtual method for the integral of the interpolating functions.
Reimplemented in apfel::LagrangeInterpolator.
|
inline |
Print the Interpolator object.
|
pure virtual |
This purely virtual function computes the lower and upper bounds on which the the sum over interpolants is limited.
x | the value in x to be interpolated |
sg | the SubGrid over which the interpolant is defined |
Implemented in apfel::LagrangeInterpolator.
|
friend |
Method which prints Interpolator with cout <<. This only prints the first subgrid and is supposed to be used for debugging purposes.
|
protected |
The array with the distribution values on the joint grid.
|
protected |
The array with the distribution values on the subgrid.
|
protected |
The stored grid reference.