pub trait RootFinder<const I: usize, const O: usize, T> {
// Required methods
fn max_iter(&self) -> usize;
fn tol(&self) -> f64;
fn find<P: RootFindingProblem<I, O, T>>(&self, problem: &P) -> Result<Pt<I>>;
}Expand description
Trait to define a root finder
§Type Parameters
I: Input type (e.g.f64,[f64; N], or etc.)O: Output type (e.g.f64,[f64; N], or etc.)T: State type (e.g.f64,(f64, f64), or etc.)
§Methods
max_iter: Maximum number of iterationstol: Absolute tolerancefind: Find root
§Available root finders
BisectionMethod:I=1, O=1, T=(f64, f64)FalsePositionMethod:I=1, O=1, T=(f64, f64)NewtonMethod:I=1, O=1, T=f64SecantMethod:I=1, O=1, T=(f64, f64)
Required Methods§
fn max_iter(&self) -> usize
fn tol(&self) -> f64
fn find<P: RootFindingProblem<I, O, T>>(&self, problem: &P) -> Result<Pt<I>>
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.