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§
Sourcefn find_root<F>(
&self,
f: F,
initial_guess: f64,
config: &SolverConfig,
) -> MathResult<f64>
fn find_root<F>( &self, f: F, initial_guess: f64, config: &SolverConfig, ) -> MathResult<f64>
Finds a root of the given function.
§Arguments
f- The function for which to find a rootinitial_guess- Starting point for the searchconfig- 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.