Class AlphaFormInverseLinear
The alpha form 1/(1 + α t_i).
[WorkingType]
public sealed class AlphaFormInverseLinear : AlphaForm
- Inheritance
-
AlphaFormInverseLinear
- Inherited Members
Remarks
A working type. A rate past the times, which QuantLib reads unchecked, is refused.
Constructors
AlphaFormInverseLinear(ReadOnlySpan<double>, double)
Initializes a new instance of the AlphaFormInverseLinear class.
public AlphaFormInverseLinear(ReadOnlySpan<double> times, double alpha = 0)
Parameters
timesReadOnlySpan<double>Each rate's time.
alphadoubleThe initial α.
Methods
Clone()
Copies the form deeply, its α with it.
public override AlphaForm Clone()
Returns
- AlphaForm
The copy.
Evaluate(int)
The form's value at the i-th rate, at the current α.
public override double Evaluate(int i)
Parameters
iintThe rate.
Returns
- double
The multiplier.
Exceptions
- ArgumentOutOfRangeException
iisn't a rate.
SetAlpha(double)
Sets the form's α.
public override void SetAlpha(double alpha)
Parameters
alphadoubleThe α.