Trait Gradient1

Source
pub trait Gradient1: Vars {
    // Required method
    fn dual(&self) -> &Array1<f64>;

    // Provided method
    fn gradient1(&self, vars: Vec<String>) -> Array1<f64> { ... }
}
Expand description

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

Required Methods§

Source

fn dual(&self) -> &Array1<f64>

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

Provided Methods§

Source

fn gradient1(&self, vars: Vec<String>) -> Array1<f64>

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

Duplicate vars are dropped before parsing.

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§