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

The Distribution class defines one of the basic objects of APFEL++. This is essentially the discretisation of a function that can be conveniently used for convolutions. More...

#include <distribution.h>

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

Public Member Functions

 Distribution ()=delete
 
void SetJointGrid (int const &ix, double const &x)
 Function to set the values of the joint grid.
 
void SetSubGrid (int const &ig, int const &ix, double const &x)
 Function to push back the values of the subgrid.
 
void SetJointGrid (std::vector< double > const &jg)
 Function to set the joint grid.
 
void SetSubGrid (int const &ig, std::vector< double > const &sg)
 Function to set the single sub-grid.
 
void SetSubGrids (std::vector< std::vector< double > > const &sgs)
 Function to set all the sub-grids.
 
Distribution Derivative () const
 Function that returns the derivative of the Distribution in the form of a Distribution object.
 
Constructors

List of constructors.

 Distribution (Grid const &g)
 The Distribution constructor.
 
 Distribution (Distribution const &obj)
 The Distribution constructor.
 
 Distribution (Distribution const &obj, std::vector< std::vector< double > > const &distsubgrid, std::vector< double > const &distjointgrid)
 The Distribution constructor.
 
 Distribution (Grid const &g, std::vector< std::vector< double > > const &distsubgrid, std::vector< double > const &distjointgrid)
 The Distribution constructor.
 
 Distribution (Grid const &g, std::function< double(double const &)> const &InDistFunc)
 The Distribution constructor.
 
 Distribution (Grid const &g, std::function< double(double const &, double const &)> const &InDistFunc, double const &Q)
 The Distribution constructor.
 
 Distribution (Grid const &g, std::function< double(int const &, double const &)> const &InDistFunc, int const &ipdf)
 The Distribution constructor.
 
 Distribution (Grid const &g, std::function< double(int const &, double const &, double const &)> const &InDistFunc, int const &ipdf, double const &Q)
 The Distribution constructor.
 
Binary operators
Distributionoperator= (Distribution const &d)
 this = Distribution
 
Distributionoperator*= (double const &s)
 this *= Scalar
 
Distributionoperator*= (std::function< double(double const &)> const &f)
 this *= Function of the integration variable
 
Distributionoperator/= (double const &s)
 this /= Scalar
 
Distributionoperator*= (Distribution const &d)
 this *= Distribution
 
Distributionoperator+= (Distribution const &d)
 this += Distribution
 
Distributionoperator-= (Distribution const &d)
 this -= Distribution
 
- Public Member Functions inherited from apfel::LagrangeInterpolator
 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 Distribution class defines one of the basic objects of APFEL++. This is essentially the discretisation of a function that can be conveniently used for convolutions.

Examples
distribution_test.cc, doubleobjint_test.cc, interpolation_test.cc, massiveCF_test.cc, principal_value_test.cc, qgriddist_test.cc, structurefunction_cc_test.cc, structurefunction_massive_test.cc, structurefunction_nc_pol_test.cc, and structurefunction_nc_test.cc.

Constructor & Destructor Documentation

◆ Distribution() [1/9]

apfel::Distribution::Distribution ( )
delete

◆ Distribution() [2/9]

apfel::Distribution::Distribution ( Grid const & g)

The Distribution constructor.

Parameters
gthe Grid object that defines the x-space interpolation grid

◆ Distribution() [3/9]

apfel::Distribution::Distribution ( Distribution const & obj)

The Distribution constructor.

Parameters
obja reference distribution from wich the grid and the actual distributions are extracted

◆ Distribution() [4/9]

apfel::Distribution::Distribution ( Distribution const & obj,
std::vector< std::vector< double > > const & distsubgrid,
std::vector< double > const & distjointgrid )

The Distribution constructor.

Parameters
obja reference distribution from wich the grid is extracted
distsubgridthe vector of the distribution on the subgrids
distjointgridthe vector of the distribution on the joint grid

◆ Distribution() [5/9]

apfel::Distribution::Distribution ( Grid const & g,
std::vector< std::vector< double > > const & distsubgrid,
std::vector< double > const & distjointgrid )

The Distribution constructor.

Parameters
gthe Grid object that defines the x-space interpolation grid
distsubgridthe vector of the distribution on the subgrids
distjointgridthe vector of the distribution on the joint grid

◆ Distribution() [6/9]

apfel::Distribution::Distribution ( Grid const & g,
std::function< double(double const &)> const & InDistFunc )

The Distribution constructor.

Parameters
gthe Grid object that defines the x-space interpolation grid
InDistFunca function of x to be tabulated on the grid in x

◆ Distribution() [7/9]

apfel::Distribution::Distribution ( Grid const & g,
std::function< double(double const &, double const &)> const & InDistFunc,
double const & Q )

The Distribution constructor.

Parameters
gthe Grid object that defines the x-space interpolation grid
InDistFunca function of x and Q to be tabulated on the grid in x
Qthe value of Q in which InDistFunc has to be tabulated

◆ Distribution() [8/9]

apfel::Distribution::Distribution ( Grid const & g,
std::function< double(int const &, double const &)> const & InDistFunc,
int const & ipdf )

The Distribution constructor.

Parameters
gthe Grid object that defines the x-space interpolation grid
InDistFunca function of ipdf and x to be tabulated on the grid in x
ipdfthe value of ipdf in which InDistFunc has to be tabulated

◆ Distribution() [9/9]

apfel::Distribution::Distribution ( Grid const & g,
std::function< double(int const &, double const &, double const &)> const & InDistFunc,
int const & ipdf,
double const & Q )

The Distribution constructor.

Parameters
gthe Grid object that defines the x-space interpolation grid
InDistFunca function of ipdf, x, and Q to be tabulated on the grid in x
ipdfthe value of ipdf in which InDistFunc has to be tabulated
Qthe value of Q in which InDistFunc has to be tabulated

Member Function Documentation

◆ Derivative()

Distribution apfel::Distribution::Derivative ( ) const

Function that returns the derivative of the Distribution in the form of a Distribution object.

◆ operator*=() [1/3]

Distribution & apfel::Distribution::operator*= ( Distribution const & d)

this *= Distribution

◆ operator*=() [2/3]

Distribution & apfel::Distribution::operator*= ( double const & s)

this *= Scalar

◆ operator*=() [3/3]

Distribution & apfel::Distribution::operator*= ( std::function< double(double const &)> const & f)

this *= Function of the integration variable

◆ operator+=()

Distribution & apfel::Distribution::operator+= ( Distribution const & d)

this += Distribution

◆ operator-=()

Distribution & apfel::Distribution::operator-= ( Distribution const & d)

this -= Distribution

◆ operator/=()

Distribution & apfel::Distribution::operator/= ( double const & s)

this /= Scalar

◆ operator=()

Distribution & apfel::Distribution::operator= ( Distribution const & d)

this = Distribution

◆ SetJointGrid() [1/2]

void apfel::Distribution::SetJointGrid ( int const & ix,
double const & x )

Function to set the values of the joint grid.

Parameters
ixthe vector index
xvalue of of the distribution to set in the distribution vector on the joint grid

◆ SetJointGrid() [2/2]

void apfel::Distribution::SetJointGrid ( std::vector< double > const & jg)

Function to set the joint grid.

Parameters
jgthe vector of the joint grid

◆ SetSubGrid() [1/2]

void apfel::Distribution::SetSubGrid ( int const & ig,
int const & ix,
double const & x )

Function to push back the values of the subgrid.

Parameters
igthe subgrid index
ixthe vector index
xvalue of of the distribution to set in the distribution vector on the joint grid

◆ SetSubGrid() [2/2]

void apfel::Distribution::SetSubGrid ( int const & ig,
std::vector< double > const & sg )

Function to set the single sub-grid.

Parameters
igthe subgrid index
sgthe vector of the sub-grid

◆ SetSubGrids()

void apfel::Distribution::SetSubGrids ( std::vector< std::vector< double > > const & sgs)

Function to set all the sub-grids.

Parameters
sgsthe vector of vectoris of the sub-grids

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