15 template <
typename Real>
25 inline virtual Real
GetXMin()
const override;
26 inline virtual Real
GetXMax()
const override;
30 virtual void Lookup(Real
x,
int&
index, Real& dx)
const override;
36 template <
typename Real>
41 template <
typename Real>
43 Real xSpacing, Real
const* F)
55 std::vector<Real> slope(quantity + 3);
57 for (i = 0, ip1 = 1, ip2 = 2; i < quantity - 1; ++i, ++ip1, ++ip2)
59 slope[ip2] = (this->
mF[ip1] - this->
mF[i]) * invDX;
62 slope[1] = ((Real)2) * slope[2] - slope[3];
63 slope[0] = ((Real)2) * slope[1] - slope[2];
64 slope[quantity + 1] = ((Real)2) * slope[quantity] - slope[quantity - 1];
65 slope[quantity + 2] = ((Real)2) * slope[quantity + 1] - slope[quantity];
68 std::vector<Real> FDer(quantity);
69 for (i = 0; i < quantity; ++i)
77 for (i = 0, ip1 = 1; i < quantity - 1; ++i, ++ip1)
79 auto& poly = this->
mPoly[i];
85 Real FDer1 = FDer[ip1];
89 poly[2] = (((Real)3) * df -
mXSpacing * (FDer1 + ((Real)2) * FDer0)) * invDX2;
90 poly[3] = (
mXSpacing * (FDer0 + FDer1) - ((Real)2) * df) * invDX3;
94 template <
typename Real>
inline 100 template <
typename Real>
inline 106 template <
typename Real>
inline 112 template <
typename Real>
std::vector< Polynomial > mPoly
#define LogAssert(condition, message)
Real ComputeDerivative(Real *slope) const