Struct Bilinear
The bilinear-interpolation factory.
public readonly struct Bilinear : IInterpolator2D
- Implements
- Inherited Members
Remarks
A stateless configuration struct: every instance, its zero value included, is QuantLib's Bilinear().
Methods
Interpolate(ReadOnlySpan<double>, ReadOnlySpan<double>, Matrix)
Builds a BilinearInterpolation over the given grid, which it copies.
public Interpolation2D Interpolate(ReadOnlySpan<double> x, ReadOnlySpan<double> y, Matrix z)
Parameters
xReadOnlySpan<double>The x values, which must be sorted; at least 2.
yReadOnlySpan<double>The y values, which must be sorted; at least 2.
zMatrixThe function values, a row per y value and a column per x value.
Returns
- Interpolation2D
The interpolation.
Exceptions
- ArgumentNullException
zis null.- ArgumentException
There are fewer than 2 x or y values, or the matrix is smaller than the grid.