Struct roots::SimpleConvergency [] [src]

pub struct SimpleConvergency<F: FloatType> {
    pub eps: F,
    pub max_iter: usize,
}

A very basic convergency rules that must be sufficient for many cases. The absolute precision is the same for x and y axes, no relative precision.

Fields

eps: F

Precision for both X and Y axes

max_iter: usize

Maximum number of iterations

Trait Implementations

impl<F: FloatType> Convergency<F> for SimpleConvergency<F>
[src]

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