LHAPDF 6.5.6
Loading...
Searching...
No Matches
LHAPDF::BicubicInterpolator Class Reference

Implementation of bicubic interpolation. More...

#include <BicubicInterpolator.h>

Inheritance diagram for LHAPDF::BicubicInterpolator:
LHAPDF::Interpolator

Public Member Functions

double _interpolateXQ2 (const KnotArray &subgrid, double x, size_t ix, double q2, size_t iq2, int id) const
 Interpolate a single-point in (x,Q2), given x/Q2 values and subgrid indices.
void _interpolateXQ2 (const KnotArray &subgrid, double x, size_t ix, double q2, size_t iq2, std::vector< double > &ret) const
 Interpolate a single-point in (x,Q2), given x/Q2 values and subgrid indices, for all 11 standard flavours at once.
Public Member Functions inherited from LHAPDF::Interpolator
virtual ~Interpolator ()
 Destructor to allow inheritance.
std::string type () const
void setType (std::string t)
 Set the interpolation type.
void bind (const GridPDF *pdf)
 Bind to a GridPDF.
void unbind ()
 Unbind from GridPDF.
bool hasPDF ()
 Identify whether this Interpolator has an associated PDF.
const GridPDF & pdf () const
 Get the associated GridPDF.
double interpolateXQ (int id, double x, double q) const
 Interpolate a single-point in (x,Q).
double interpolateXQ2 (int id, double x, double q2) const
 Interpolate a single-point in (x,Q2).
void interpolateXQ2 (double x, double q2, std::vector< double > &ret) const

Detailed Description

Implementation of bicubic interpolation.

This class will interpolate in 2D using a bicubic hermite spline.

Member Function Documentation

◆ _interpolateXQ2() [1/2]

double LHAPDF::BicubicInterpolator::_interpolateXQ2 ( const KnotArray & grid,
double x,
size_t ix,
double q2,
size_t iq2,
int id ) const
virtual

Interpolate a single-point in (x,Q2), given x/Q2 values and subgrid indices.

The key function to be overridden in derived classes: the subgrid and x/Q2 index lookup (and their caching) are done centrally in the Interpolator base class so do not need to be re-implemented in each flavour of interpolator.

Implements LHAPDF::Interpolator.

◆ _interpolateXQ2() [2/2]

void LHAPDF::BicubicInterpolator::_interpolateXQ2 ( const KnotArray & grid,
double x,
size_t ix,
double q2,
size_t iq2,
std::vector< double > & ret ) const
virtual

Interpolate a single-point in (x,Q2), given x/Q2 values and subgrid indices, for all 11 standard flavours at once.

This can be overridden in derived classes for a more CPU-efficient implementation than the default looping over all flavours: often the grid coefficients for the point can be efficiently reused for each flavour.

Reimplemented from LHAPDF::Interpolator.


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