ILNumerics Ultimate VS

CubicInterpolatorFComplex Constructor

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Creates a cubic interpolator object, using specified values in V at positions in X.

[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 CubicInterpolatorFComplex(
	InArray<fcomplex> V,
	InArray<float> X,
	Nullable<fcomplex> outOfRangeValues = null
)

Parameters

V
Type: ILNumericsInArrayfcomplex
Vector of length m or n-dimensional array of size [m, l1, l2, ..., ln-1].
X
Type: ILNumericsInArraySingle
Strictly monotonically increasing coordinates. Vector or n-dimensional array with m elements.
outOfRangeValues (Optional)
Type: SystemNullablefcomplex
[Optional] Value to be assigned to interpolation results outside of the range specified by X. Default: (null) value outside of the X range are extrapolated.
Exceptions

ExceptionCondition
ArgumentExceptionIf X/ V have less than 4 elements, if values in X are not strictly monotonically increasing, if X or V have more than 2 dimensions, or if the number of elements in X does not match the length of the working dimension in V.
ArgumentNullExceptionIf any of input parameters are NULL
ArgumentExceptionIf arguments X or V have different size.
Remarks

For an input vector V, CubicInterpolatorSingle prepares a 1-dimensional, cubic interpolator object, for the given set of m measured values. The new interpolator can be used to compute multiple new interpolated values efficiently. See: [!:Apply(InArray<fcomplex>, InCell)].

If V is a matrix or a n-dimensional array the columns of V are considered n individual sets of measurements, all providing individual values at the same coordinates X. Each element requested in [!:Apply(InArray<fcomplex>, InCell)] will be interpolated regarding all respective columns of V. In this case n becomes: V.S.NumberOfElements / m, with m=V.S[0].

Alternatively, V can be defined as vector (row or column vector) of length m.

After all values have been acquired, the object should be released in order to free its resources. Commonly, in .NET, the utiliziation of CubicInterpolatorSingle inside of a using directive is recommended.

[ILNumerics Interpolation Toolbox]

Examples

// Define some sample points as a function: f(x) = sin(x);
Array<fcomplex> X = linspace<fcomplex>(-pi, pi, 10);
Array<fcomplex> V = sin(X);

// Create Interpolator Object
using (var interp = new CubicInterpolatorSingle(V, X)) 
{ 
    // Get some random scalar values
    fcomplex val1 = (fcomplex)interp.Apply(0.024);
    fcomplex val2 = (fcomplex)interp.Apply(-0.21);

    // Get 10 linear spaced values defined on range (-0.5, 1.25)
    Array<fcomplex> valRange = interp.Apply(linspace<fcomplex>(-0.5, 1.25, 10));

    // Get 30 interpolated values using Xn query points defined as array[3 x 2 x 5]
    Array<fcomplex> Xn = counter(0.0, 0.1, 3, 2, 5);
    Array<fcomplex> Vn = interp.Apply(Xn);
}

See Also

Reference