Skip to main content

GradientFunction

Trait GradientFunction 

Source
pub trait GradientFunction {
    // Required method
    fn evaluate(&self, parameters: &[f64]) -> Vec<f64>;
}
Expand description
  • GradientFunction: A trait for gradient functions that can be used in optimization algorithms. It has a method evaluate that takes a vector of parameters and returns a vector of the same length representing the gradient of the objective function at those parameters.

Required Methods§

Source

fn evaluate(&self, parameters: &[f64]) -> Vec<f64>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§