Trait roots::Convergency
source · pub trait Convergency<F: FloatType> {
fn is_root_found(&mut self, y: F) -> bool;
fn is_converged(&mut self, x1: F, x2: F) -> bool;
fn is_iteration_limit_reached(&mut self, iter: usize) -> bool;
}
Expand description
The way to check if the algorithm has finished by either finding a root or reaching the iteration limit.
Required Methods§
sourcefn is_root_found(&mut self, y: F) -> bool
fn is_root_found(&mut self, y: F) -> bool
Return true if the given Y value is close enough to the zero
sourcefn is_converged(&mut self, x1: F, x2: F) -> bool
fn is_converged(&mut self, x1: F, x2: F) -> bool
Return true if given x values are close enough to each other
sourcefn is_iteration_limit_reached(&mut self, iter: usize) -> bool
fn is_iteration_limit_reached(&mut self, iter: usize) -> bool
Return true if no more iterations desired