Cubic Spline Class
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
public class CubicSpline : PiecewiseCurve
- Inheritance
- Object → Curve → PiecewiseCurve → CubicSpline
Remarks
Use the CubicSpline class to interpolate tabulated data, or to approximate a function defined in terms of tabulated data.
A cubic spline is a piecewise curve defined by a third degree polynomial on each interval.
Splines are defined by the data points and some additional conditions. Depending on the nature of these conditions, different types of spline curves arise. There are four kinds of splines. These types are enumerated by the CubicSplineKind type.
A natural spline is a spline curve whose second derivative at the end points are zero. This type of spline tends to minimize the overall curvature of the spline. There is only one natural spline for a given set of data points.
A clamped spline is a spline curve whose slope is fixed at both end points. There is a clamped spline curve for each pair of slopes. Therefore, two parameters must be defined in addition to the data points to specify a clamped spline completely.
Clamped and natural splines have continuous second derivatives.
A cubic Hermite spline is a spline curve whose slope is fixed at each data point. These slopes must be provided by the user. As a result of these additional conditions, the second derivative is no longer continuous.
An Akima spline is a variation of a spline that is robust against outliers. The polynomial on each interval is defined using only a limited number of points. This means that, unlike natural and clamped splines, the effect of an anomalous data point doesn't propagate throughout the curve. Akima splines require only the data points. No other information is needed.
A smoothing spline is a variation of a natural spline that reduces the curvature of the curve at the expense of no longer interpolating the data points.
Constructors
Cubic | Constructs the natural cubic spline through a set of points. |
Cubic |
Constructs the natural cubic spline through a set of points.
Obsolete. |
Cubic | Constructs the natural cubic spline through a set of points. |
Cubic | Constructs the cubic Hermite spline through a set of points. |
Cubic | Constructs the natural cubic spline through a set of points. |
Cubic | Constructs the natural cubic spline through a set of points. |
Cubic | Constructs a natural or Akima cubic spline through a set of points. |
Cubic |
Constructs the cubic Hermite spline through a set of points.
Obsolete. |
Cubic | Constructs a cubic smoothing spline with the specified smoothing parameter. |
Cubic | Constructs a clamped cubic spline through a set of points. |
Cubic | Constructs the natural cubic spline through a set of points. |
Cubic | Constructs the cubic Hermite spline through a set of points. |
Cubic | Constructs the cubic Hermite spline through a set of points. |
Cubic | Constructs a clamped cubic spline through a set of points. |
Cubic | Constructs a cubic smoothing spline with the specified smoothing parameter. |
Cubic | Constructs a clamped cubic spline through a set of points. |
Properties
Kind | Gets the type of the cubic spline. |
Number |
Gets the number of intervals that make up this PiecewiseCurve.
(Inherited from PiecewiseCurve) |
Parameters |
Gets the collection of parameters that determine the shape of this
Curve.
(Inherited from Curve) |
Methods
Clone |
Constructs an exact copy of this instance.
(Inherited from Curve) |
Create | Constructs the natural cubic spline through a set of points. |
Create | Constructs the cubic Akima spline through a set of points. |
Create | Constructs a clamped cubic spline through a set of points. |
Create | Constructs a clamped cubic spline through a set of points. |
Create | Constructs the cubic Hermite spline through a set of points. |
Create | Constructs the cubic Hermite spline through a set of points. |
Create | Constructs a cubic spline through a set of points that preserves monotonicity. |
Create | Constructs a cubic spline through a set of points that preserves monotonicity. |
Create | Constructs the natural cubic spline through a set of points. |
Create | Constructs the natural cubic spline through a set of points. |
Create | Constructs a cubic spline through a set of points with not-a-knot boundary conditions. |
Create | Constructs a cubic spline through a set of points with not-a-knot boundary conditions. |
Create | Constructs a smoothing spline for a set of points with specified smoothing parameter. |
Create | Constructs a smoothing spline for a set of points with specified smoothing parameter and weights for the data points. |
Create | Constructs a smoothing spline for a set of points with specified smoothing parameter. |
Create | Constructs a smoothing spline for a set of points with specified smoothing parameter and weights for the data points. |
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) |
Find |
Gets the set of X-coordinates where the curve crosses
the X-axis.
(Overrides Curve.FindRoots()) |
Get |
Returns a CurveFitter object that can be used to fit the curve to data.
(Inherited from Curve) |
Get |
Gets the data point with the specified index.
(Inherited from PiecewiseCurve) |
Get |
Returns a Curve that represents the derivative
of this Curve.
(Inherited from Curve) |
Get | Serves as the default hash function. (Inherited from Object) |
Get | Returns a polynomial that represents the cubic spline at the specified point. |
Get | Returns a polynomial that represents the cubic spline on the specified interval. |
Get | Gets the Type of the current instance. (Inherited from Object) |
Get |
Returns the X value of the data point with the specified index.
(Inherited from PiecewiseCurve) |
Get |
Returns a span containing the X-values of the data points.
(Inherited from PiecewiseCurve) |
Get |
Returns the Y value of the data point with the specified index.
(Inherited from PiecewiseCurve) |
Get |
Returns a span containing the Y-values of the data points.
(Inherited from PiecewiseCurve) |
Index |
Finds the index of the lower bound of the interval that contains the specfied value.
(Inherited from PiecewiseCurve) |
Integral |
Gets the definite integral of the curve between the
specified X-coordinates.
(Overrides PiecewiseCurve.Integral(Double, Double)) |
Integrate |
Returns the value of the integral over the interval with the specified index.
(Overrides PiecewiseCurve.IntegrateOnInterval(Int32)) |
Integrate |
Returns the integral of the curve over a single interval.
(Overrides PiecewiseCurve.IntegrateOnInterval(Int32, Double, Double)) |
Memberwise | Creates a shallow copy of the current Object. (Inherited from Object) |
OnParameter |
Called after a curve parameter has changed.
(Overrides Curve.OnParameterChanged(Int32, Double)) |
OnParameter |
Called before the value of a curve parameter is changed.
(Inherited from PiecewiseCurve) |
Set |
Sets the X value of the data point with the specified index.
(Inherited from PiecewiseCurve) |
Set |
Sets the data points at the specified indexes.
(Inherited from PiecewiseCurve) |
Set |
Sets a curve parameter to the specified value.
(Inherited from Curve) |
Set |
Sets the X value of the data point with the specified index.
(Inherited from PiecewiseCurve) |
Set |
Sets the X values at the specified indexes.
(Inherited from PiecewiseCurve) |
Set |
Sets the Y value of the data point with the specified index.
(Inherited from PiecewiseCurve) |
Set |
Sets the Y values at the specified indexes.
(Inherited from PiecewiseCurve) |
Slope |
Gets the slope of the curve at the specified
X-coordinate.
(Overrides Curve.SlopeAt(Double)) |
Solve |
Finds the x value where the curve reaches the specified y value.
(Inherited from Curve) |
Tangent |
Gets the tangent line to the curve at the
specified X-coordinate.
(Inherited from Curve) |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Value |
Gets the Y-value of the curve at the specified
X-coordinate.
(Overrides Curve.ValueAt(Double)) |