Table of Contents

Struct Bilinear

Namespace
NanoQL.Numerics
Assembly
NanoQL.dll

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

x ReadOnlySpan<double>

The x values, which must be sorted; at least 2.

y ReadOnlySpan<double>

The y values, which must be sorted; at least 2.

z Matrix

The function values, a row per y value and a column per x value.

Returns

Interpolation2D

The interpolation.

Exceptions

ArgumentNullException

z is null.

ArgumentException

There are fewer than 2 x or y values, or the matrix is smaller than the grid.