Class LagrangeInterpolator¶
Defined in File interpolation.h
Class Documentation¶
-
class LagrangeInterpolator¶
Lagrange-polynomial interpolator for evaluating one or more tabulated functions at a fixed query point
xi, using a fixed-order local polynomial centered nearxi.Used by the EOP (
GetEopData, lupnt/data/eop.cc) and IAU SOFA constants (GetIauSofaData, lupnt/data/iau_sofa.cc) loaders to interpolate tabulated Earth-orientation/precession-nutation series to an arbitrary epoch: constructing the interpolator once selects theorder+1 table points nearestxiand precomputes the Lagrange weights, andInterpolateis then called once per data column (e.g. x_pole, y_pole, UT1-UTC, …) sharing the same abscissax.Public Functions
-
LagrangeInterpolator(const VecXd &x, double xi, int order)¶
Construct an interpolator for query point
xiover abscissa tablex, using a local Lagrange polynomial of degreeorder(i.e.ordertable points).Selects the
orderconsecutive points ofxwhose span is best centered onxi(viaComputeFirstIndex) and precomputes the corresponding Lagrange basis weights (viaComputeWeights).- Parameters:
x – Strictly monotonic table of abscissa samples (e.g. MJD/JD epochs)
xi – Query point; must lie within
[x(0), x(end)](withinEPS), else throwsorder – Number of table points used by the local interpolant (interpolant degree =
order- 1);x.size()must be >order
-
LagrangeInterpolator(const VecXd &x, double xi, int order)¶