ILNumerics Ultimate VS

SplineInterpolatorDouble Constructor

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Create cubic spline interpolator object from known values.

[ILNumerics Interpolation Toolbox]

Namespace:  ILNumerics.Toolboxes
Assembly:  ILNumerics.Toolboxes.Interpolation (in ILNumerics.Toolboxes.Interpolation.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax

public SplineInterpolatorDouble(
	InArray<double> V,
	InArray<double> X,
	InArray<double> lowerBoundDerivative = null,
	InArray<double> upperBoundDerivative = null,
	Nullable<double> outOfRangeValues = null
)

Parameters

V
Type: ILNumericsInArrayDouble
Known values. Vector of length n or matrix of size [m x n].
X
Type: ILNumericsInArrayDouble
Strictly monotonically increasing x coordinates. Vector of length n.
lowerBoundDerivative (Optional)
Type: ILNumericsInArrayDouble
[Optional] Lower boundary 1st derivative(s). Options: given value(s), not-a-knot (null (default) or PositiveInfinity), natural (NaN).
upperBoundDerivative (Optional)
Type: ILNumericsInArrayDouble
[Optional] Upper boundary 1st derivative(s). Options: given value(s), not-a-knot (null (default) or PositiveInfinity), natural (NaN).
outOfRangeValues (Optional)
Type: SystemNullableDouble
[Optional] Value to be assigned to all interpolation results outside of the domain specified by X. Default: (null) extrapolate.
Exceptions

ExceptionCondition
ArgumentNullException if either X or V are null on entry.
ArgumentException on any invalid argument.
Remarks

This object should be used in a using block in order to clean up its resources after use.

For an input vector V, SplineInterpolatorDouble prepares a 1-dimensional, single spline interpolation object for the given set of n measured values. Subsequently, interpolated values can be derived by help of this object efficiently. After all values have been acquired, the object should be released in order to free its resources. Commonly, in .NET, the utiliziation of SplineInterpolatorDouble inside of a using directive is recommended.

If V is provided as a matrix or a n-dim array, the columns of V are considered as m individual sets of measurements, all at the same positions as determined by X. Each element requested in Apply(InArrayDouble, InCell) later will be interpolated for each column of V. In this case m becomes: V.S.NumberOfElements / V.S[0].

The parameters upperBoundDerivative and lowerBoundDerivative determine the first derivatives at the lower and upper end of the spline interpolations for each column of V respectively. If a vector is provided its length must match m, the number of sets provided in V. Possible values for elements in upperBoundDerivative and lowerBoundDerivative are:

  • NaN: 'natural spline': the first derivative depends on the slope of the neighboring pieces. The second derivative will be zero.
  • PositiveInfinity: 'not-a-knot spline' (default): based on the existing three points next to the boundary a cubic polynomial is used to construct a new virtual point outside of the specified domain. The derivative at the end points is than computed from it. This corresponds to 'leaving' out one knot / value, hence the name.
  • Other numerical values are considered as the first derivative for the corresponding sample set in V.

Providing a scalar array for either one of upperBoundDerivative and/or lowerBoundDerivative will cause the corresponding derivatives of all sample sets to behave according to the above list. Null (the default) or an empty array leads to 'not-a-knot' splines for all sample sets.

Spline interpolation requires at least 4 values in the working dimension of V.

[ILNumerics Interpolation Toolbox]

See Also

Reference