[][src]Enum gkquad::Tolerance

pub enum Tolerance {
    Absolute(f64),
    Relative(f64),
    AbsOrRel(f64f64),
    AbsAndRel(f64f64),
}

Specify the tolerance which must be satisfied after calculation

It is recommended to Relative tolerance higher than 1e-14, since roundoff error prevents the calculation error from converging into 0.

Variants

Absolute(f64)

delta < absolute

Relative(f64)

delta < relative * result

AbsOrRel(f64f64)

delta < max(absolute, relative * result)

AbsAndRel(f64f64)

delta < min(absolute, relative * result)

Methods

impl Tolerance[src]

pub fn to_abs(&self, value: f64) -> f64[src]

calculate the absolute tolerance from estimation

Trait Implementations

impl Clone for Tolerance[src]

impl Debug for Tolerance[src]

impl Default for Tolerance[src]

impl PartialEq<Tolerance> for Tolerance[src]

impl StructuralPartialEq for Tolerance[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.