Back to Eqiora docs Skip to main content

LinearizedOutput

Trait LinearizedOutput 

pub trait LinearizedOutput<S>: Debug + Sync {
    // Required methods
    fn unknown_dimension(&self) -> usize;
    fn parameter_dimension(&self) -> usize;
    fn output_dimension(&self) -> usize;
    fn primal(&self, output: &mut [S]) -> Result<(), Diagnostic>;
    fn jvp(
        &self,
        unknown_tangent: &[S],
        parameter_tangent: &[S],
        output_tangent: &mut [S],
    ) -> Result<(), Diagnostic>;
    fn vjp(
        &self,
        output_cotangent: &[S],
        unknown_cotangent: &mut [S],
        parameter_cotangent: &mut [S],
    ) -> Result<(), Diagnostic>;
}
Description

One immutable linearization of a selected output projection y = O(w, p).

A relation linearization describes how the accepted implicit state moves; this paired contract describes what an application actually publishes. Keeping the two separate prevents method-native algebraic unknowns from being mistaken for complete semantic Field values. Implementations provide both actions from the same primal projection, including any direct Parameter dependence of eliminated constraints or derived outputs.

Required Methods§

fn unknown_dimension(&self) -> usize

Number of implicit-state coordinates consumed by the projection.

fn parameter_dimension(&self) -> usize

Number of selected design coordinates consumed by the projection.

fn output_dimension(&self) -> usize

Number of published output coordinates.

fn primal(&self, output: &mut [S]) -> Result<(), Diagnostic>

Evaluate the output at the fixed accepted point.

§Errors

Returns a structured diagnostic for a shape mismatch or non-finite output.

fn jvp( &self, unknown_tangent: &[S], parameter_tangent: &[S], output_tangent: &mut [S], ) -> Result<(), Diagnostic>

Evaluate O_w * dw + O_p * dp.

§Errors

Returns a structured diagnostic for a shape mismatch or non-finite action.

fn vjp( &self, output_cotangent: &[S], unknown_cotangent: &mut [S], parameter_cotangent: &mut [S], ) -> Result<(), Diagnostic>

Evaluate (O_w^T * c, O_p^T * c) in one paired reverse action.

§Errors

Returns a structured diagnostic for a shape mismatch or non-finite action.

Implementations on Foreign Types§

§

impl LinearizedOutput<f64> for CartesianScalarFieldLinearization

§

fn unknown_dimension(&self) -> usize

§

fn parameter_dimension(&self) -> usize

§

fn output_dimension(&self) -> usize

§

fn primal(&self, output: &mut [f64]) -> Result<(), Diagnostic>

§

fn jvp( &self, unknown_tangent: &[f64], parameter_tangent: &[f64], output_tangent: &mut [f64], ) -> Result<(), Diagnostic>

§

fn vjp( &self, output_cotangent: &[f64], unknown_cotangent: &mut [f64], parameter_cotangent: &mut [f64], ) -> Result<(), Diagnostic>

Implementors§