Trait LiftParams
pub trait LiftParams: Real + Sized {
// Required method
fn lift(stored: &[f64]) -> Cow<'_, [Self]>;
}Expand description
A pricing mode that stored f64 parameters can be lifted into.
Public because Scalar has it as a supertrait, but it is an implementation
seam rather than a surface a caller uses: the modes are enumerated below and
the set is closed.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Implementors§
impl LiftParams for AReal<f64>
impl LiftParams for Jet1<f64>
impl LiftParams for Jet2<f64>
impl<const K: usize> LiftParams for JetK<f64, K>
The K-lane forward dual, admitted to the scalar set and consumed by two entry points.
The macro above stamps concrete types; this mode is generic in its lane
count, so it is written out. What it does is identical — convert through
From<f64>, which gives every lane a zero tangent.
Admission means a generic pricing body can be instantiated at it, and that
the cross-mode value-identity harness sweeps it. Consumption is separate,
and is a decision per entry point: the K-lane mode serves a full gradient
over n inputs in ⌈n/K⌉ tape-free passes, and exactly two entry points
present that shape — the calibration Jacobian in calibration.rs and the
bond-curve fit in curves/fit.rs, each of which wants every quote against
every parameter as a whole matrix in a module that records no tape. Risk
stays many-to-one in reverse mode and the pillar solve stays one-to-one in
Jet1.
The distinction is a requirement rather than a convention; see the
numeric-scalar-modes capability, whose routing test holds the manifest of
consumers. What is measured, and what the decision rests on, is
benches/mode_crossover.rs.
There is no trait seam for lane seeding.
Seedable carries one direction, which
is the solve’s shape; each K-lane consumer seeds its own block of K
parameters with a unit tangent per lane in a loop it owns, because what is
seeded (pillars or coefficients) is the consumer’s business.