Trait sprs::approx::UlpsEq[][src]

pub trait UlpsEq<Rhs = Self>: AbsDiffEq<Rhs> where
    Rhs: ?Sized
{ pub fn default_max_ulps() -> u32;
pub fn ulps_eq(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool; pub fn ulps_ne(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool { ... } }

Equality comparisons between two numbers using both the absolute difference and ULPs (Units in Last Place) based comparisons.

Required methods

pub fn default_max_ulps() -> u32[src]

The default ULPs to tolerate when testing values that are far-apart.

This is used when no max_ulps value is supplied to the ulps_eq macro.

pub fn ulps_eq(
    &self,
    other: &Rhs,
    epsilon: Self::Epsilon,
    max_ulps: u32
) -> bool
[src]

A test for equality that uses units in the last place (ULP) if the values are far apart.

Loading content...

Provided methods

pub fn ulps_ne(
    &self,
    other: &Rhs,
    epsilon: Self::Epsilon,
    max_ulps: u32
) -> bool
[src]

The inverse of ApproxEq::ulps_eq.

Loading content...

Implementations on Foreign Types

impl UlpsEq<f32> for f32[src]

impl<T> UlpsEq<Cell<T>> for Cell<T> where
    T: UlpsEq<T> + Copy
[src]

impl<A, B> UlpsEq<[B]> for [A] where
    A: UlpsEq<B>,
    <A as AbsDiffEq<B>>::Epsilon: Clone
[src]

impl<T> UlpsEq<RefCell<T>> for RefCell<T> where
    T: UlpsEq<T> + ?Sized
[src]

impl UlpsEq<f64> for f64[src]

impl<'a, T> UlpsEq<&'a T> for &'a T where
    T: UlpsEq<T> + ?Sized
[src]

impl<'a, T> UlpsEq<&'a mut T> for &'a mut T where
    T: UlpsEq<T> + ?Sized
[src]

impl<O> UlpsEq<Id<O>> for Id<O> where
    O: Operator
[src]

Loading content...

Implementors

impl<N, I, IS1, DS1, IS2, DS2> UlpsEq<CsVecBase<IS2, DS2, N, I>> for CsVecBase<IS1, DS1, N, I> where
    I: SpIndex,
    CsVecBase<IS1, DS1, N, I>: PartialEq<CsVecBase<IS2, DS2, N, I>>,
    IS1: Deref<Target = [I]>,
    IS2: Deref<Target = [I]>,
    DS1: Deref<Target = [N]>,
    DS2: Deref<Target = [N]>,
    N: UlpsEq,
    N::Epsilon: Clone,
    N: Zero
[src]

impl<N, I, Iptr, IS1, DS1, ISptr1, IS2, ISptr2, DS2> UlpsEq<CsMatBase<N, I, ISptr2, IS2, DS2, Iptr>> for CsMatBase<N, I, ISptr1, IS1, DS1, Iptr> where
    I: SpIndex,
    Iptr: SpIndex,
    CsMatBase<N, I, ISptr1, IS1, DS1, Iptr>: PartialEq<CsMatBase<N, I, ISptr2, IS2, DS2, Iptr>>,
    IS1: Deref<Target = [I]>,
    IS2: Deref<Target = [I]>,
    ISptr1: Deref<Target = [Iptr]>,
    ISptr2: Deref<Target = [Iptr]>,
    DS1: Deref<Target = [N]>,
    DS2: Deref<Target = [N]>,
    N: UlpsEq,
    N::Epsilon: Clone,
    N: Zero
[src]

Loading content...