[ILNumerics Interpolation Toolbox]
Namespace: ILNumerics.Toolboxes
Assembly: ILNumerics.Toolboxes.Interpolation (in ILNumerics.Toolboxes.Interpolation.dll) Version: 5.5.0.0 (5.5.7503.3146)
public CubicInterpolatorComplex( InArray<complex> V, InArray<double> X, Nullable<complex> outOfRangeValues = null )
Parameters
- V
- Type: ILNumericsInArraycomplex
Vector of length m or n-dimensional array of size [m, l1, l2, ..., ln-1]. - X
- Type: ILNumericsInArrayDouble
Strictly monotonically increasing coordinates. Vector or n-dimensional array with m elements. - outOfRangeValues (Optional)
- Type: SystemNullablecomplex
[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.
Exception | Condition |
---|---|
ArgumentException | If 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. |
ArgumentNullException | If any of input parameters are NULL |
ArgumentException | If arguments X or V have different size. |
For an input vector V, CubicInterpolatorDouble 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<complex>, 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<complex>, 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 CubicInterpolatorDouble inside of a using directive is recommended.
[ILNumerics Interpolation Toolbox]
// Define some sample points as a function: f(x) = sin(x); Array<complex> X = linspace<complex>(-pi, pi, 10); Array<complex> V = sin(X); // Create Interpolator Object using (var interp = new CubicInterpolatorDouble(V, X)) { // Get some random scalar values complex val1 = (complex)interp.Apply(0.024); complex val2 = (complex)interp.Apply(-0.21); // Get 10 linear spaced values defined on range (-0.5, 1.25) Array<complex> valRange = interp.Apply(linspace<complex>(-0.5, 1.25, 10)); // Get 30 interpolated values using Xn query points defined as array[3 x 2 x 5] Array<complex> Xn = counter(0.0, 0.1, 3, 2, 5); Array<complex> Vn = interp.Apply(Xn); }