Skip to main content

ResidualJet

Trait ResidualJet 

Source
pub trait ResidualJet<P: Precision<Native>>: Problem<P> {
    // Required method
    fn residual_jet(
        &self,
        zs: &[Vec<&[f64]>],
        nout: usize,
        par: bool,
    ) -> Result<Vec<Vec<P::Scalar>>, String>;

    // Provided method
    fn jet_orders<'a>(
        &'a self,
        order: usize,
    ) -> Result<Box<dyn JetOrders<P> + 'a>, String>
       where P: 'a { ... }
}
Expand description

A problem whose equations depend on a parameter p, with the residual’s Taylor series in it: the coefficients of F(sum_k z_k h^k, p0 + h) in h, exact to the precision P

Required Methods§

Source

fn residual_jet( &self, zs: &[Vec<&[f64]>], nout: usize, par: bool, ) -> Result<Vec<Vec<P::Scalar>>, String>

The coefficients of orders 0..nout - 1, one scalar per row, for the coefficient vectors zs (each P::PARTS part arrays of length len(), z_k zero past them). Order k is linear in z_k: J z_k plus what the lower orders give.

Provided Methods§

Source

fn jet_orders<'a>( &'a self, order: usize, ) -> Result<Box<dyn JetOrders<P> + 'a>, String>
where P: 'a,

The residual’s series one order at a time (JetOrders), for orders up to order. By default each order is residual_jet’s, which forms every lower order again (Recompute), so a series of order N costs N evaluations of growing length. A problem that keeps its lower orders between calls overrides it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§