GradientCollection

Trait GradientCollection 

Source
pub trait GradientCollection {
    // Required methods
    fn get_gradient<D: Dimension>(
        &self,
        key: &str,
    ) -> Result<ArrayView<'_, f64, D>, ModelError>;
    fn set_gradient<D: Dimension>(
        &mut self,
        key: &str,
        value: ArrayView<'_, f64, D>,
    ) -> Result<(), ModelError>;
}

Required Methods§

Source

fn get_gradient<D: Dimension>( &self, key: &str, ) -> Result<ArrayView<'_, f64, D>, ModelError>

Get a reference to a specific gradient with strong typing.

Source

fn set_gradient<D: Dimension>( &mut self, key: &str, value: ArrayView<'_, f64, D>, ) -> Result<(), ModelError>

Set the value of a gradient.

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§