Trait sprs::approx::AbsDiffEq [−][src]
Equality that is defined using the absolute difference of two numbers.
Associated Types
Loading content...Required methods
pub fn default_epsilon() -> Self::Epsilon
[src]
The default tolerance to use when testing values that are close together.
This is used when no epsilon
value is supplied to the abs_diff_eq!
, relative_eq!
, or
ulps_eq!
macros.
pub fn abs_diff_eq(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
Provided methods
pub fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
[src]
The inverse of ApproxEq::abs_diff_eq
.
Implementations on Foreign Types
impl<T> AbsDiffEq<RefCell<T>> for RefCell<T> where
T: AbsDiffEq<T> + ?Sized,
[src]
T: AbsDiffEq<T> + ?Sized,
type Epsilon = <T as AbsDiffEq<T>>::Epsilon
pub fn default_epsilon() -> <T as AbsDiffEq<T>>::Epsilon
[src]
pub fn abs_diff_eq(
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &RefCell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl AbsDiffEq<i64> for i64
[src]
type Epsilon = i64
pub fn default_epsilon() -> i64
[src]
pub fn abs_diff_eq(&self, other: &i64, epsilon: i64) -> bool
[src]
impl AbsDiffEq<u64> for u64
[src]
type Epsilon = u64
pub fn default_epsilon() -> u64
[src]
pub fn abs_diff_eq(&self, other: &u64, epsilon: u64) -> bool
[src]
impl AbsDiffEq<u8> for u8
[src]
type Epsilon = u8
pub fn default_epsilon() -> u8
[src]
pub fn abs_diff_eq(&self, other: &u8, epsilon: u8) -> bool
[src]
impl AbsDiffEq<f64> for f64
[src]
type Epsilon = f64
pub fn default_epsilon() -> f64
[src]
pub fn abs_diff_eq(&self, other: &f64, epsilon: f64) -> bool
[src]
impl<'a, T> AbsDiffEq<&'a T> for &'a T where
T: AbsDiffEq<T> + ?Sized,
[src]
T: AbsDiffEq<T> + ?Sized,
type Epsilon = <T as AbsDiffEq<T>>::Epsilon
pub fn default_epsilon() -> <T as AbsDiffEq<T>>::Epsilon
[src]
pub fn abs_diff_eq(
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &&'a T,
epsilon: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl<T> AbsDiffEq<Cell<T>> for Cell<T> where
T: AbsDiffEq<T> + Copy,
[src]
T: AbsDiffEq<T> + Copy,
type Epsilon = <T as AbsDiffEq<T>>::Epsilon
pub fn default_epsilon() -> <T as AbsDiffEq<T>>::Epsilon
[src]
pub fn abs_diff_eq(
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &Cell<T>,
epsilon: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl<'a, T> AbsDiffEq<&'a mut T> for &'a mut T where
T: AbsDiffEq<T> + ?Sized,
[src]
T: AbsDiffEq<T> + ?Sized,
type Epsilon = <T as AbsDiffEq<T>>::Epsilon
pub fn default_epsilon() -> <T as AbsDiffEq<T>>::Epsilon
[src]
pub fn abs_diff_eq(
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon
) -> bool
[src]
&self,
other: &&'a mut T,
epsilon: <T as AbsDiffEq<T>>::Epsilon
) -> bool
impl AbsDiffEq<isize> for isize
[src]
type Epsilon = isize
pub fn default_epsilon() -> isize
[src]
pub fn abs_diff_eq(&self, other: &isize, epsilon: isize) -> bool
[src]
impl AbsDiffEq<i8> for i8
[src]
type Epsilon = i8
pub fn default_epsilon() -> i8
[src]
pub fn abs_diff_eq(&self, other: &i8, epsilon: i8) -> bool
[src]
impl AbsDiffEq<i32> for i32
[src]
type Epsilon = i32
pub fn default_epsilon() -> i32
[src]
pub fn abs_diff_eq(&self, other: &i32, epsilon: i32) -> bool
[src]
impl<A, B> AbsDiffEq<[B]> for [A] where
A: AbsDiffEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
[src]
A: AbsDiffEq<B>,
<A as AbsDiffEq<B>>::Epsilon: Clone,
type Epsilon = <A as AbsDiffEq<B>>::Epsilon
pub fn default_epsilon() -> <A as AbsDiffEq<B>>::Epsilon
[src]
pub fn abs_diff_eq(
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon
) -> bool
[src]
&self,
other: &[B],
epsilon: <A as AbsDiffEq<B>>::Epsilon
) -> bool
impl AbsDiffEq<usize> for usize
[src]
type Epsilon = usize
pub fn default_epsilon() -> usize
[src]
pub fn abs_diff_eq(&self, other: &usize, epsilon: usize) -> bool
[src]
impl AbsDiffEq<u32> for u32
[src]
type Epsilon = u32
pub fn default_epsilon() -> u32
[src]
pub fn abs_diff_eq(&self, other: &u32, epsilon: u32) -> bool
[src]
impl AbsDiffEq<i16> for i16
[src]
type Epsilon = i16
pub fn default_epsilon() -> i16
[src]
pub fn abs_diff_eq(&self, other: &i16, epsilon: i16) -> bool
[src]
impl AbsDiffEq<u16> for u16
[src]
type Epsilon = u16
pub fn default_epsilon() -> u16
[src]
pub fn abs_diff_eq(&self, other: &u16, epsilon: u16) -> bool
[src]
impl AbsDiffEq<f32> for f32
[src]
type Epsilon = f32
pub fn default_epsilon() -> f32
[src]
pub fn abs_diff_eq(&self, other: &f32, epsilon: f32) -> bool
[src]
impl<O> AbsDiffEq<Id<O>> for Id<O> where
O: Operator,
[src]
O: Operator,
type Epsilon = Id<O>
pub fn default_epsilon() -> <Id<O> as AbsDiffEq<Id<O>>>::Epsilon
[src]
pub fn abs_diff_eq(&self, &Id<O>, <Id<O> as AbsDiffEq<Id<O>>>::Epsilon) -> bool
[src]
Implementors
impl<N, I, IS1, DS1, IS2, DS2> AbsDiffEq<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: AbsDiffEq,
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: AbsDiffEq,
N::Epsilon: Clone,
N: Zero,
type Epsilon = N::Epsilon
fn default_epsilon() -> N::Epsilon
[src]
fn abs_diff_eq(
&self,
other: &CsVecBase<IS2, DS2, N, I>,
epsilon: N::Epsilon
) -> bool
[src]
&self,
other: &CsVecBase<IS2, DS2, N, I>,
epsilon: N::Epsilon
) -> bool
impl<N, I, Iptr, IS1, DS1, ISptr1, IS2, ISptr2, DS2> AbsDiffEq<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: AbsDiffEq,
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: AbsDiffEq,
N::Epsilon: Clone,
N: Zero,
type Epsilon = N::Epsilon
fn default_epsilon() -> N::Epsilon
[src]
fn abs_diff_eq(
&self,
other: &CsMatBase<N, I, ISptr2, IS2, DS2, Iptr>,
epsilon: N::Epsilon
) -> bool
[src]
&self,
other: &CsMatBase<N, I, ISptr2, IS2, DS2, Iptr>,
epsilon: N::Epsilon
) -> bool