Struct UnitPayoff
struct UnitPayoff {
last: usize,
}Expand description
A unit payment at one grid step — the smallest asset that shows the fit.
Fields§
§last: usizeTrait Implementations§
§impl DiscretizedAsset<f64> for UnitPayoff
impl DiscretizedAsset<f64> for UnitPayoff
§fn last_step(&self) -> usize
fn last_step(&self) -> usize
The last (latest) step index where the asset has value — rollback
starts here.
§fn adjust_values(
&self,
step: usize,
_: &HullWhiteLattice<f64>,
values: &mut [f64],
)
fn adjust_values( &self, step: usize, _: &HullWhiteLattice<f64>, values: &mut [f64], )
Adjust the slice values at
step: inject cashflows, apply exercise.
Called once at the terminal step (with zero-initialised values) to
set the terminal payoff, then after each rollback step. values is
indexed by node offset (0 ⇒ j = −half_width). Read moreAuto Trait Implementations§
impl Freeze for UnitPayoff
impl RefUnwindSafe for UnitPayoff
impl Send for UnitPayoff
impl Sync for UnitPayoff
impl Unpin for UnitPayoff
impl UnsafeUnpin for UnitPayoff
impl UnwindSafe for UnitPayoff
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more