Class FdmAmericanStepCondition
The American exercise condition: each value floored at its inner value, from the exercise's start on.
[WorkingType]
public sealed class FdmAmericanStepCondition : StepCondition
- Inheritance
-
FdmAmericanStepCondition
- Inherited Members
Remarks
A working type: it walks the layout with an iterator it holds and resets, so applying it allocates nothing.
Constructors
FdmAmericanStepCondition(FdmMesher, FdmInnerValueCalculator, double)
Initializes a new instance of the FdmAmericanStepCondition class.
public FdmAmericanStepCondition(FdmMesher mesher, FdmInnerValueCalculator calculator, double exerciseStart = 0)
Parameters
mesherFdmMesherThe mesher.
calculatorFdmInnerValueCalculatorThe inner value's calculator.
exerciseStartdoubleThe time the exercise starts, 0 by default.
Exceptions
- ArgumentNullException
The mesher or the calculator is null.
Methods
ApplyTo(Span<double>, double)
Applies the condition to the values at time t, in place.
public override void ApplyTo(Span<double> a, double t)
Parameters
Exceptions
- ArgumentException
The values' length isn't the layout's size.