Trait Gradient2

Source
pub trait Gradient2: Gradient1 {
    // Required method
    fn dual2(&self) -> &Array2<f64>;

    // Provided methods
    fn gradient2(&self, vars: Vec<String>) -> Array2<f64> { ... }
    fn gradient1_manifold(&self, vars: Vec<String>) -> Array1<Dual2> { ... }
}
Expand description

Provides calculations of second order gradients to all, or a set of provided, vars.

Required Methods§

Source

fn dual2(&self) -> &Array2<f64>

Get a reference to the Array containing the second order gradients.

Provided Methods§

Source

fn gradient2(&self, vars: Vec<String>) -> Array2<f64>

Return a set of first order gradients ordered by the given vector.

Duplicate vars are dropped before parsing.

Source

fn gradient1_manifold(&self, vars: Vec<String>) -> Array1<Dual2>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§