Trait peroxide::numerical::root::RootFinder
source · 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=f64
SecantMethod
: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>>
Object Safety§
This trait is not object safe.