Fritsch |
Calculate the Fritsch-Carlson monotone cubic spline interpolation for the given abscissa vector x and ordinate vector y. All vectors must have conformant dimensions. The abscissa vector must be strictly increasing.
The Fritsch-Carlson interpolation produces a neat monotone piecewise cubic curve, which is especially suited for the presentation of scientific data. This is the state of the art to create curves that preserve monotonicity, although it is not so well known as Akima's interpolation. The commonly used Akima interpolation doesn't produce equally pleasant results.
Reference: F.N.Fritsch,R.E.Carlson: Monotone Piecewise Cubic Interpolation, SIAM J. Numer. Anal. Vol 17, No. 2, April 1980 Copyright (C) 1991-1998 by Berndt M. Gammel Translated to C# by Dirk Lellinger.
public class FritschCarlsonCubicSpline : CurveBase, IInterpolationFunction, IInterpolationCurve
The FritschCarlsonCubicSpline type exposes the following members.
| Name | Description | |
|---|---|---|
| FritschCarlsonCubicSpline | Initializes a new instance of the FritschCarlsonCubicSpline class |
| Name | Description | |
|---|---|---|
| CubicSplineCoefficients |
Calculate the spline coefficients y2(i) and y3(i) for a natural cubic
spline, given the abscissa x(i), the ordinate y(i), and the 1st
derivative y1(i).
(Inherited from CurveBase) | |
| CubicSplineHorner |
Return the interpolation value P(u) for a piecewise cubic curve determined
by the abscissa vector x, the ordinate vector y,
and derivative coefficient vectors y1, y2, and y3, using the Horner scheme.
(Inherited from CurveBase) | |
| CubicSplineHorner1stDerivative |
Return the first derivative P'(u) of the piecewise cubic curve evaluated using Horner's scheme.
(Inherited from CurveBase) | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| GetCurvePoints |
Get curve points to draw an interpolation curve between the abscissa values xlo and xhi.
It calls the virtual methods MpCurveBase::GetXOfU() and GetYOfU() to obtain the
interpolation values. Note, that before method DrawCurve() can be called
the method Interpolate() must have been called. Otherwise, not interpolation
is available.
(Inherited from CurveBase) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| GetXOfU |
Get the abscissa value in dependence on parameter u.
(Overrides CurveBaseGetXOfU(Double)) | |
| GetY1stDerivativeOfX | Returns the first derivative of the spline at the specified abscissa value. | |
| GetYOfU |
Gets the ordinate value on dependence on parameter u.
(Overrides CurveBaseGetYOfU(Double)) | |
| GetYOfX | Returns the y value in dependence of a given x value. | |
| Interpolate |
Interpolates a curve using abcissa x and ordinate y.
(Overrides CurveBaseInterpolate(IReadOnlyListDouble, IReadOnlyListDouble)) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| Parametrize |
Curve length parametrization. Returns the accumulated "distances"
between the points (x(i),y(i)) and (x(i+1),y(i+1)) in t(i+1)
for i = lo ... hi. t(lo) = 0.0 always.
(Inherited from CurveBase) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
| Name | Description | |
|---|---|---|
| x | Reference to the vector of the independent variable. (Inherited from CurveBase) | |
| y | Reference to the vector of the dependent variable. (Inherited from CurveBase) | |
| y1 | First derivative estimates for each spline knot. | |
| y2 | Quadratic coefficients of the cubic spline segments. | |
| y3 | Cubic coefficients of the spline segments. |