Struct LiftedMarket
pub struct LiftedMarket<R: Scalar> {
values: Vec<R>,
spans: Arc<[Span]>,
}Expand description
A market’s parameters lifted into one mode, with the layout that labels them.
Owned by the caller and borrowed by the view, which is what makes the lift free of shared mutable state: registering handles writes here, not into the market, so two threads lifting the same market never meet.
Fields§
§values: Vec<R>§spans: Arc<[Span]>The layout, shared with the market it was lifted from.
Implementations§
§impl<R: Scalar> LiftedMarket<R>
impl<R: Scalar> LiftedMarket<R>
pub fn parameters(&self) -> &[R]
pub fn parameters(&self) -> &[R]
The lifted parameters, end to end.
pub fn parameters_mut(&mut self) -> &mut [R]
pub fn parameters_mut(&mut self) -> &mut [R]
The lifted parameters, mutably.
Substituting a caller’s own numbers is what the lift is for, so moving
one here and repricing is a scenario, a bump, or a finite difference —
and it still leaves the stored market alone. Do not use it on a vector
that has already been registered: a
registered handle’s value and its tape slot travel together, and writing
through one without the other would price at a number the recording never
saw.
Trait Implementations§
§impl<R: Clone + Scalar> Clone for LiftedMarket<R>
impl<R: Clone + Scalar> Clone for LiftedMarket<R>
§fn clone(&self) -> LiftedMarket<R>
fn clone(&self) -> LiftedMarket<R>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more