Table of Contents

Class LogMixedLinearCubicNaturalSpline

Namespace
NanoQL.Numerics
Assembly
NanoQL.dll

Log-mixed-linear-cubic interpolation whose cubic part is the natural cubic spline of the logarithms.

public sealed class LogMixedLinearCubicNaturalSpline : LogMixedLinearCubicInterpolation
Inheritance
LogMixedLinearCubicNaturalSpline
Inherited Members
Extension Methods

Remarks

QuantLib's convenience class: a LogMixedLinearCubicInterpolation with Spline, monotonic false, and second-derivative boundary conditions of 0, which only the spline schemes read.

Constructors

LogMixedLinearCubicNaturalSpline(ReadOnlySpan<double>, ReadOnlySpan<double>, int, MixedInterpolationBehavior)

Initializes a new instance of the LogMixedLinearCubicNaturalSpline class.

public LogMixedLinearCubicNaturalSpline(ReadOnlySpan<double> x, ReadOnlySpan<double> y, int n, MixedInterpolationBehavior behavior = MixedInterpolationBehavior.ShareRanges)

Parameters

x ReadOnlySpan<double>

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

y ReadOnlySpan<double>

The y values, one per x value, each positive.

n int

The index of the switch point, one of the points.

behavior MixedInterpolationBehavior

Whether the two interpolations share the points' range or split it.

Exceptions

ArgumentOutOfRangeException

n is negative, or behavior isn't a member of its enum.

ArgumentException

The sizes differ, there are fewer than 3 points, n isn't the index of a point, a part has too few points, or a y value isn't positive.