APFEL 4.8.0
A PDF evolution library in C++
Loading...
Searching...
No Matches
Public Member Functions | List of all members
apfel::LagrangeInterpolator Class Reference

The LagrangeInterpolator class is a specialization of the Interpolator class using the lagrange interpolation procedure. More...

#include <lagrangeinterpolator.h>

Inheritance diagram for apfel::LagrangeInterpolator:
apfel::Interpolator apfel::Distribution

Public Member Functions

 LagrangeInterpolator (Grid const &gr)
 The LagrangeInterpolator constructor.
 
 LagrangeInterpolator (Grid const &gr, std::vector< std::vector< double > > const &distsubgrid, std::vector< double > const &distjointgrid)
 The LagrangeInterpolator constructor.
 
double InterpolantLog (int const &beta, double const &lnx, SubGrid const &sg) const
 This function defines the interpolating function used by the mother class Interpolator to perform the actual interpolation using polynomials in log(x).
 
double Interpolant (int const &beta, double const &x, SubGrid const &sg) const
 This function defines the interpolating function used by the mother class Interpolator to perform the interpolation.
 
double DerInterpolant (int const &beta, double const &x, SubGrid const &sg) const
 This function defines the derivative of the interpolating function used by the mother class Interpolator to perform the actual interpolation.
 
double IntInterpolant (int const &beta, double const &a, double const &b, SubGrid const &sg) const
 This function defines the integral of the interpolating function used by the mother class Interpolator to perform the actual interpolation.
 
std::array< int, 2 > SumBounds (double const &x, SubGrid const &sg) const
 This function computes the lower and upper bounds on which the the sum over interpolants is limited.
 
- Public Member Functions inherited from apfel::Interpolator
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.
 
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.
 
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.
 

Additional Inherited Members

- Protected Attributes inherited from apfel::Interpolator
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.
 

Detailed Description

The LagrangeInterpolator class is a specialization of the Interpolator class using the lagrange interpolation procedure.

Constructor & Destructor Documentation

◆ LagrangeInterpolator() [1/2]

apfel::LagrangeInterpolator::LagrangeInterpolator ( Grid const & gr)

The LagrangeInterpolator constructor.

Parameters
grthe x-space grid object over which interpolation takes place
See also
Interpolator::Interpolator

◆ LagrangeInterpolator() [2/2]

apfel::LagrangeInterpolator::LagrangeInterpolator ( Grid const & gr,
std::vector< std::vector< double > > const & distsubgrid,
std::vector< double > const & distjointgrid )

The LagrangeInterpolator constructor.

Parameters
grthe x-space grid object over which interpolation takes place
distsubgridthe vector of subgrids
distjointgridthe joint subgrid
See also
Interpolator::Interpolator
Note
distjointgrid and distsubgrid are assumed to match the structure of the grid gr.

Member Function Documentation

◆ DerInterpolant()

double apfel::LagrangeInterpolator::DerInterpolant ( int const & beta,
double const & x,
SubGrid const & sg ) const
virtual

This function defines the derivative of the interpolating function used by the mother class Interpolator to perform the actual interpolation.

Parameters
betathe x-space grid index
xthe value of the interpolation point
sgthe SubGrid over which the interpolant is defined
Returns
the derivative of the interpolation weights
See also
Interpolator::DerInterpolant

Reimplemented from apfel::Interpolator.

◆ Interpolant()

double apfel::LagrangeInterpolator::Interpolant ( int const & beta,
double const & x,
SubGrid const & sg ) const
virtual

This function defines the interpolating function used by the mother class Interpolator to perform the interpolation.

Parameters
betathe x-space grid index
xthe value of the interpolation point
sgthe SubGrid over which the interpolant is defined
Returns
the interpolation weights
See also
Interpolator::Interpolant

Implements apfel::Interpolator.

◆ InterpolantLog()

double apfel::LagrangeInterpolator::InterpolantLog ( int const & beta,
double const & lnx,
SubGrid const & sg ) const
virtual

This function defines the interpolating function used by the mother class Interpolator to perform the actual interpolation using polynomials in log(x).

Parameters
betathe x-space grid index
lnxthe value (of the log) of the interpolation point
sgthe SubGrid over which the interpolant is defined
Returns
the interpolation weights
See also
Interpolator::InterpolantLog

Implements apfel::Interpolator.

◆ IntInterpolant()

double apfel::LagrangeInterpolator::IntInterpolant ( int const & beta,
double const & a,
double const & b,
SubGrid const & sg ) const
virtual

This function defines the integral of the interpolating function used by the mother class Interpolator to perform the actual interpolation.

Parameters
betathe x-space grid index
athe value of the lower integration bound
bthe value of the upper integration bound
sgthe SubGrid over which the interpolant is defined
Returns
the integral of the interpolation weights
See also
Interpolator::IntInterpolant

Reimplemented from apfel::Interpolator.

◆ SumBounds()

std::array< int, 2 > apfel::LagrangeInterpolator::SumBounds ( double const & x,
SubGrid const & sg ) const
virtual

This function computes the lower and upper bounds on which the the sum over interpolants is limited.

Parameters
xthe value in x to be interpolated
sgthe SubGrid over which the interpolant is defined
Returns
the lower and upper bounds of the grid index
See also
Interpolator::SumBounds

Implements apfel::Interpolator.


The documentation for this class was generated from the following file: