Struct SolveTolerance
pub(crate) struct SolveTolerance {
pub(crate) residual: f64,
pub(crate) step: f64,
}Expand description
The convergence criteria, relative to the magnitude of what they measure.
Fields§
§residual: f64Converged when |f(x) − target| ≤ residual · max(1, |target|).
step: f64Converged when the step (or half-bracket) ≤ step · max(1, |x|).
Implementations§
§impl SolveTolerance
impl SolveTolerance
fn residual_met(self, residual: f64, target: f64) -> bool
fn residual_met(self, residual: f64, target: f64) -> bool
A zero residual tolerance switches the residual criterion off — a solve to the double’s resolution keeps halving through an exact zero rather than stopping at the first iterate that underflows to it.
fn step_met(self, step: f64, x: f64) -> bool
Trait Implementations§
§impl Clone for SolveTolerance
impl Clone for SolveTolerance
§fn clone(&self) -> SolveTolerance
fn clone(&self) -> SolveTolerance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SolveTolerance
§impl Debug for SolveTolerance
impl Debug for SolveTolerance
Auto Trait Implementations§
impl Freeze for SolveTolerance
impl RefUnwindSafe for SolveTolerance
impl Send for SolveTolerance
impl Sync for SolveTolerance
impl Unpin for SolveTolerance
impl UnsafeUnpin for SolveTolerance
impl UnwindSafe for SolveTolerance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more