Click or drag to resize

CurveBaseCubicSplineHorner Method

Return the interpolation value P(u) for a piecewise cubic curve determined by the abscissa vector x, the ordinate vector y, the 1st derivative vector y1, the 2nd derivative vector y2, and the 3rd derivative vector y3, using the Horner scheme.

Namespace: Altaxo.Calc.Interpolation
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public double CubicSplineHorner(
	double u,
	IReadOnlyList<double> x,
	IReadOnlyList<double> y,
	IReadOnlyList<double> y1,
	IReadOnlyList<double> y2,
	IReadOnlyList<double> y3
)

Parameters

u  Double
The abscissa value at which the interpolation is to be evaluated.
x  IReadOnlyListDouble
The vector (lo,hi) of data abscissa (must be strictly increasing).
y  IReadOnlyListDouble
The vectors (lo,hi) of ordinate
y1  IReadOnlyListDouble
contains the 1st derivative y'(x(i))
y2  IReadOnlyListDouble
contains the 2nd derivative y''(x(i))
y3  IReadOnlyListDouble
contains the 3rd derivative y'''(x(i))

Return Value

Double
P(u) = y(i) + dx * (y1(i) + dx * (y2(i) + dx * y3(i))). In the special case of empty data vectors (x,y) a value of 0.0 is returned.
Remarks
C#
All vectors must have conformant dimenions.
The abscissa x(i) values must be strictly increasing.


This subroutine evaluates the function

   P(u) = y(i) + dx * (y1(i) + dx * (y2(i) + dx * y3(i)))

where  x(i) <= u < x(i+1) and dx = u - x(i), using Horner's rule

   lo <= i <= hi is the index range of the vectors.
   if  u <  x(lo) then  i = lo  is used.
   if  u <= x(hi) then  i = hi  is used.

   A fast binary search is performed to determine the proper interval.
See Also