RootFinder

Trait RootFinder 

Source
pub trait RootFinder {
    // Required method
    fn find_root<F>(
        &self,
        f: F,
        initial_guess: f64,
        config: &SolverConfig,
    ) -> MathResult<f64>
       where F: Fn(f64) -> f64;
}
Expand description

Trait for root-finding algorithms.

Required Methods§

Source

fn find_root<F>( &self, f: F, initial_guess: f64, config: &SolverConfig, ) -> MathResult<f64>
where F: Fn(f64) -> f64,

Finds a root of the given function.

§Arguments
  • f - The function for which to find a root
  • initial_guess - Starting point for the search
  • config - Solver configuration

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§