Class LogMixedLinearCubicNaturalSpline
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
xReadOnlySpan<double>The x values, which must be sorted; at least 3.
yReadOnlySpan<double>The y values, one per x value, each positive.
nintThe index of the switch point, one of the points.
behaviorMixedInterpolationBehaviorWhether the two interpolations share the points' range or split it.
Exceptions
- ArgumentOutOfRangeException
nis negative, orbehaviorisn't a member of its enum.- ArgumentException
The sizes differ, there are fewer than 3 points,
nisn't the index of a point, a part has too few points, or a y value isn't positive.