Trait LineSearch

Source
pub trait LineSearch: Debug {
    // Required method
    fn search<F>(
        &self,
        function: &F,
        initial_position: &[f64],
        direction: &[f64],
    ) -> Vec<f64>
       where F: Function1;
}
Expand description

Define a line search method, i.e., choosing an appropriate step width.

Required Methods§

Source

fn search<F>( &self, function: &F, initial_position: &[f64], direction: &[f64], ) -> Vec<f64>
where F: Function1,

Performs the actual line search given the current position x and a direction to go to. Returns the new position.

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§