Trait newton_rootfinder::iteratives::Iterative[][src]

pub trait Iterative {
    fn step_limitation(&self, value_current: f64, raw_step: f64) -> f64;

    fn compute_perturbation(&self, x: f64) -> f64 { ... }
fn with_finite_diff(&self) -> bool { ... } }
Expand description

Iterative definition

One might want to limit the update steps, by either:

  • limiting the range of values to avoid non-sense values
  • limiting the size of an update step

Two implementations of this trait are provided:

  • IterativeParams
  • IterativeParamsFD

Required methods

Compute the new value based on the current value and the step size proposed

The iteratives variables implement a way to reduce this step according to the parametrization

Provided methods

Compute the perturbation (only valid if it is working with finite differences)

according to the parametrization

Method to differente without panicking if it is working with finite differences

Implementors