Trait sprs::approx::UlpsEq [−][src]
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]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_ulps: u32
) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
Provided methods
pub fn ulps_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_ulps: u32
) -> bool
The inverse of ApproxEq::ulps_eq
.
Implementations on Foreign Types
impl UlpsEq<f32> for f32
[src]
pub fn default_max_ulps() -> u32
[src]
pub fn ulps_eq(&self, other: &f32, epsilon: f32, max_ulps: u32) -> bool
[src]
impl<T> UlpsEq<Cell<T>> for Cell<T> where
T: UlpsEq<T> + Copy,
[src]
T: UlpsEq<T> + Copy,
pub fn default_max_ulps() -> u32
[src]
pub fn ulps_eq(
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
impl<A, B> UlpsEq<[B]> for [A] where
A: UlpsEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
[src]
A: UlpsEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
pub fn default_max_ulps() -> u32
[src]
pub fn ulps_eq(
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon,
max_ulps: u32
) -> bool
impl<T> UlpsEq<RefCell<T>> for RefCell<T> where
T: UlpsEq<T> + ?Sized,
[src]
T: UlpsEq<T> + ?Sized,
pub fn default_max_ulps() -> u32
[src]
pub fn ulps_eq(
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
impl UlpsEq<f64> for f64
[src]
pub fn default_max_ulps() -> u32
[src]
pub fn ulps_eq(&self, other: &f64, epsilon: f64, max_ulps: u32) -> bool
[src]
impl<'a, T> UlpsEq<&'a T> for &'a T where
T: UlpsEq<T> + ?Sized,
[src]
T: UlpsEq<T> + ?Sized,
pub fn default_max_ulps() -> u32
[src]
pub fn ulps_eq(
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
impl<'a, T> UlpsEq<&'a mut T> for &'a mut T where
T: UlpsEq<T> + ?Sized,
[src]
T: UlpsEq<T> + ?Sized,
pub fn default_max_ulps() -> u32
[src]
pub fn ulps_eq(
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_ulps: u32
) -> bool
impl<O> UlpsEq<Id<O>> for Id<O> where
O: Operator,
[src]
O: Operator,
pub fn default_max_ulps() -> u32
[src]
pub fn ulps_eq(&self, &Id<O>, <Id<O> as AbsDiffEq<Id<O>>>::Epsilon, u32) -> bool
[src]
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]
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,
fn default_max_ulps() -> u32
[src]
fn ulps_eq(
&self,
other: &CsVecBase<IS2, DS2, N, I>,
epsilon: N::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &CsVecBase<IS2, DS2, N, I>,
epsilon: N::Epsilon,
max_ulps: u32
) -> bool
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]
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,