Trait nearly_eq::NearlyEq 0.1.0
[−]
[src]
pub trait NearlyEq<Rhs: ?Sized = Self, Diff: ?Sized = Self> { fn eps() -> Diff; fn eq(&self, other: &Rhs, eps: &Diff) -> bool; fn ne(&self, other: &Rhs, eps: &Diff) -> bool { ... } }
Trait for nearly(approximately) equality comparisons.
Required Methods
fn eps() -> Diff
fn eq(&self, other: &Rhs, eps: &Diff) -> bool
This method tests for self and other values to be nearly(approximately) equal.
Provided Methods
Implementations on Foreign Types
impl<A, B, C: NearlyEq<A, B>> NearlyEq<Complex<A>, B> for Complex<C>
[src]
impl<A: Integer + Clone> NearlyEq<Ratio<A>, Ratio<A>> for Ratio<A>
[src]
impl<A: Data, B, C: Data, D: Dimension> NearlyEq<ArrayBase<A, D>, B> for ArrayBase<C, D> where
C::Elem: NearlyEq<A::Elem, B> + Sized,
[src]
C::Elem: NearlyEq<A::Elem, B> + Sized,
impl<FRAC> NearlyEq<Q<i8, FRAC>, Q<i8, FRAC>> for Q<i8, FRAC> where
FRAC: Cmp<U0, Output = Greater> + Cmp<U8, Output = Less> + Unsigned,
Self: PartialOrd + Clone + Sub<Self, Output = Self>,
[src]
FRAC: Cmp<U0, Output = Greater> + Cmp<U8, Output = Less> + Unsigned,
Self: PartialOrd + Clone + Sub<Self, Output = Self>,
impl<FRAC> NearlyEq<Q<i16, FRAC>, Q<i16, FRAC>> for Q<i16, FRAC> where
FRAC: Cmp<U0, Output = Greater> + Cmp<U16, Output = Less> + Unsigned,
Self: PartialOrd + Clone + Sub<Self, Output = Self>,
[src]
FRAC: Cmp<U0, Output = Greater> + Cmp<U16, Output = Less> + Unsigned,
Self: PartialOrd + Clone + Sub<Self, Output = Self>,
impl<FRAC> NearlyEq<Q<i32, FRAC>, Q<i32, FRAC>> for Q<i32, FRAC> where
FRAC: Cmp<U0, Output = Greater> + Cmp<U32, Output = Less> + Unsigned,
Self: PartialOrd + Clone + Sub<Self, Output = Self>,
[src]
FRAC: Cmp<U0, Output = Greater> + Cmp<U32, Output = Less> + Unsigned,
Self: PartialOrd + Clone + Sub<Self, Output = Self>,