|
|
|||
File indexing completed on 2026-06-02 08:17:13
0001 // 0002 // APFEL++ 2017 0003 // 0004 // Author: Valerio Bertone: valerio.bertone@cern.ch 0005 // 0006 0007 #pragma once 0008 0009 #include "apfel/interpolator.h" 0010 0011 namespace apfel 0012 { 0013 /** 0014 * @brief The LagrangeInterpolator class is a specialization of the 0015 * Interpolator class using the lagrange interpolation procedure. 0016 */ 0017 class LagrangeInterpolator: public Interpolator 0018 { 0019 public: 0020 /** 0021 * @brief The LagrangeInterpolator constructor. 0022 * @param gr: the x-space grid object over which interpolation takes place 0023 * @see Interpolator::Interpolator 0024 */ 0025 LagrangeInterpolator(Grid const& gr); 0026 0027 /** 0028 * @brief The LagrangeInterpolator constructor. 0029 * @param gr: the x-space grid object over which interpolation takes place 0030 * @param distsubgrid: the vector of subgrids 0031 * @param distjointgrid: the joint subgrid 0032 * @see Interpolator::Interpolator 0033 * @note distjointgrid and distsubgrid are assumed to match the 0034 * structure of the grid gr. 0035 */ 0036 LagrangeInterpolator(Grid const& gr, 0037 std::vector<std::vector<double>> const& distsubgrid, 0038 std::vector<double> const& distjointgrid); 0039 0040 /** 0041 * @brief This function defines the interpolating function used by 0042 * the mother class Interpolator to perform the actual 0043 * interpolation using polynomials in log(x). 0044 * @param beta: the x-space grid index 0045 * @param lnx: the value (of the log) of the interpolation point 0046 * @param sg: the SubGrid over which the interpolant is defined 0047 * @return the interpolation weights 0048 * @see Interpolator::InterpolantLog 0049 */ 0050 double InterpolantLog(int const& beta, double const& lnx, SubGrid const& sg) const; 0051 0052 /** 0053 * @brief This function defines the interpolating function used by 0054 * the mother class Interpolator to perform the 0055 * interpolation. 0056 * @param beta: the x-space grid index 0057 * @param x: the value of the interpolation point 0058 * @param sg: the SubGrid over which the interpolant is defined 0059 * @return the interpolation weights 0060 * @see Interpolator::Interpolant 0061 */ 0062 double Interpolant(int const& beta, double const& x, SubGrid const& sg) const; 0063 0064 /** 0065 * @brief This function defines the derivative of the 0066 * interpolating function used by the mother class Interpolator to 0067 * perform the actual interpolation. 0068 * @param beta: the x-space grid index 0069 * @param x: the value of the interpolation point 0070 * @param sg: the SubGrid over which the interpolant is defined 0071 * @return the derivative of the interpolation weights 0072 * @see Interpolator::DerInterpolant 0073 */ 0074 double DerInterpolant(int const& beta, double const& x, SubGrid const& sg) const; 0075 0076 /** 0077 * @brief This function defines the integral of the interpolating 0078 * function used by the mother class Interpolator to perform the 0079 * actual interpolation. 0080 * @param beta: the x-space grid index 0081 * @param a: the value of the lower integration bound 0082 * @param b: the value of the upper integration bound 0083 * @param sg: the SubGrid over which the interpolant is defined 0084 * @return the integral of the interpolation weights 0085 * @see Interpolator::IntInterpolant 0086 */ 0087 double IntInterpolant(int const& beta, double const& a, double const& b, SubGrid const& sg) const; 0088 0089 /** 0090 * @brief This function computes the lower and upper bounds on 0091 * which the the sum over interpolants is limited. 0092 * @param x: the value in x to be interpolated 0093 * @param sg: the SubGrid over which the interpolant is defined 0094 * @return the lower and upper bounds of the grid index 0095 * @see Interpolator::SumBounds 0096 */ 0097 std::array<int,2> SumBounds(double const& x, SubGrid const& sg) const; 0098 }; 0099 }
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|