Trait roots::Convergency
[−]
[src]
pub trait Convergency<F: FloatType> { fn is_root_found(&self, y: F) -> bool; fn is_converged(&self, x1: F, x2: F) -> bool; fn is_iteration_limit_reached(&self, iter: usize) -> bool; }
The way to check if the algorithm has finished by either finding a root or reaching the iteration limit.
Required Methods
fn is_root_found(&self, y: F) -> bool
Return true if the given Y value is close enough to the zero
fn is_converged(&self, x1: F, x2: F) -> bool
Return true if given x values are close enough to each other
fn is_iteration_limit_reached(&self, iter: usize) -> bool
Return true if no more iterations desired
Implementors
impl<F: FloatType> Convergency<F> for SimpleConvergency<F>
impl<F: FloatType + Display + LowerExp> Convergency<F> for DebugConvergency<F>