Trait sprs::approx::RelativeEq [−][src]
Equality comparisons between two numbers using both the absolute difference and relative based comparisons.
Required methods
pub fn default_max_relative() -> Self::Epsilon
[src]
The default relative tolerance for testing values that are far-apart.
This is used when no max_relative
value is supplied to the relative_eq
macro.
pub fn relative_eq(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Provided methods
pub fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
Implementations on Foreign Types
impl RelativeEq<f32> for f32
[src]
pub fn default_max_relative() -> f32
[src]
pub fn relative_eq(&self, other: &f32, epsilon: f32, max_relative: f32) -> bool
[src]
impl<T> RelativeEq<Cell<T>> for Cell<T> where
T: RelativeEq<T> + Copy,
[src]
T: RelativeEq<T> + Copy,
pub fn default_max_relative() -> <T as AbsDiffEq<T>>::Epsilon
[src]
pub fn relative_eq(
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl<'a, T> RelativeEq<&'a T> for &'a T where
T: RelativeEq<T> + ?Sized,
[src]
T: RelativeEq<T> + ?Sized,
pub fn default_max_relative() -> <T as AbsDiffEq<T>>::Epsilon
[src]
pub fn relative_eq(
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl<A, B> RelativeEq<[B]> for [A] where
A: RelativeEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
[src]
A: RelativeEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
pub fn default_max_relative() -> <A as AbsDiffEq<B>>::Epsilon
[src]
pub fn relative_eq(
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon,
max_relative: <A as AbsDiffEq<B>>::Epsilon
) -> bool
[src]
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon,
max_relative: <A as AbsDiffEq<B>>::Epsilon
) -> bool
impl RelativeEq<f64> for f64
[src]
pub fn default_max_relative() -> f64
[src]
pub fn relative_eq(&self, other: &f64, epsilon: f64, max_relative: f64) -> bool
[src]
impl<T> RelativeEq<RefCell<T>> for RefCell<T> where
T: RelativeEq<T> + ?Sized,
[src]
T: RelativeEq<T> + ?Sized,
pub fn default_max_relative() -> <T as AbsDiffEq<T>>::Epsilon
[src]
pub fn relative_eq(
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl<'a, T> RelativeEq<&'a mut T> for &'a mut T where
T: RelativeEq<T> + ?Sized,
[src]
T: RelativeEq<T> + ?Sized,
pub fn default_max_relative() -> <T as AbsDiffEq<T>>::Epsilon
[src]
pub fn relative_eq(
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon,
max_relative: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl<O> RelativeEq<Id<O>> for Id<O> where
O: Operator,
[src]
O: Operator,
pub fn default_max_relative() -> <Id<O> as AbsDiffEq<Id<O>>>::Epsilon
[src]
pub fn relative_eq(
&self,
&Id<O>,
<Id<O> as AbsDiffEq<Id<O>>>::Epsilon,
<Id<O> as AbsDiffEq<Id<O>>>::Epsilon
) -> bool
[src]
&self,
&Id<O>,
<Id<O> as AbsDiffEq<Id<O>>>::Epsilon,
<Id<O> as AbsDiffEq<Id<O>>>::Epsilon
) -> bool
Implementors
impl<N, I, IS1, DS1, IS2, DS2> RelativeEq<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: RelativeEq,
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: RelativeEq,
N::Epsilon: Clone,
N: Zero,
fn default_max_relative() -> N::Epsilon
[src]
fn relative_eq(
&self,
other: &CsVecBase<IS2, DS2, N, I>,
epsilon: N::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &CsVecBase<IS2, DS2, N, I>,
epsilon: N::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl<N, I, Iptr, IS1, DS1, ISptr1, IS2, ISptr2, DS2> RelativeEq<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: RelativeEq,
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: RelativeEq,
N::Epsilon: Clone,
N: Zero,
fn default_max_relative() -> N::Epsilon
[src]
fn relative_eq(
&self,
other: &CsMatBase<N, I, ISptr2, IS2, DS2, Iptr>,
epsilon: N::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &CsMatBase<N, I, ISptr2, IS2, DS2, Iptr>,
epsilon: N::Epsilon,
max_relative: Self::Epsilon
) -> bool