Enum Form
enum Form<'a> {
SelfDiscounting,
ProjectionOver(&'a Curve),
ProjectionUnder {
discount: &'a Curve,
foreign: &'a Curve,
},
CollateralUnder {
pay_discount: &'a Curve,
pay_projection: &'a Curve,
recv_projection: Option<&'a Curve>,
pay_index: Option<&'a str>,
recv_index: Option<&'a str>,
},
}Expand description
Which curve a ladder solves, and where the rest of the view comes from.
The three forms differ only in the role view_over gives the curve under
solve; the loop, the sweeps, the quote check and the Jacobian are one body.
Variants§
SelfDiscounting
The curve under solve discounts and projects every rung.
ProjectionOver(&'a Curve)
The curve under solve projects; the discount is fixed and passive.
ProjectionUnder
The curve under solve projects; the discount and the foreign curve a non-deliverable conversion reads are fixed and passive.
CollateralUnder
The curve under solve is a cross-currency rung’s receive-leg collateral discount; the pay leg’s discount and both legs’ projections are fixed and passive.
Implementations§
§impl<'a> Form<'a>
impl<'a> Form<'a>
fn lift<R: Scalar>(self) -> LiftedForm<'a, R>
fn lift<R: Scalar>(self) -> LiftedForm<'a, R>
The form’s fixed curves lifted into mode R, passive: they contribute
no derivative to a Newton step or a Jacobian column.
fn serves_one_projection(self) -> bool
fn serves_one_projection(self) -> bool
Whether every projection a rung names is served by the one curve under solve — true of the single-curve forms, where a rung projecting two different indices is a shape the ladder refuses.