Trait matrixcompare::comparators::ElementwiseComparator [−][src]
pub trait ElementwiseComparator<T> { type Error: Display; fn compare(&self, x: &T, y: &T) -> Result<(), Self::Error>; fn description(&self) -> String; }
Trait that describes elementwise comparators for assert_matrix_eq!.
Usually you should not need to interface with this trait directly. It is a part of the documentation only so that the trait bounds for the comparators are made public.
Associated Types
Loading content...Required methods
fn compare(&self, x: &T, y: &T) -> Result<(), Self::Error>
[src]
Compares two elements.
Returns the error associated with the comparison if it failed.
fn description(&self) -> String
[src]
A description of the comparator.
Implementors
impl<T> ElementwiseComparator<T> for AbsoluteElementwiseComparator<T> where
T: Clone + Display + Num + PartialOrd<T>,
[src]
impl<T> ElementwiseComparator<T> for AbsoluteElementwiseComparator<T> where
T: Clone + Display + Num + PartialOrd<T>,
[src]type Error = AbsoluteError<T>
fn compare(&self, a: &T, b: &T) -> Result<(), AbsoluteError<T>>
[src]
fn description(&self) -> String
[src]
impl<T> ElementwiseComparator<T> for ExactElementwiseComparator where
T: Display + PartialEq<T>,
[src]
impl<T> ElementwiseComparator<T> for ExactElementwiseComparator where
T: Display + PartialEq<T>,
[src]type Error = ExactError
fn compare(&self, a: &T, b: &T) -> Result<(), ExactError>
[src]
fn description(&self) -> String
[src]
impl<T> ElementwiseComparator<T> for FloatElementwiseComparator<T> where
T: Ulp + FloatCore + Display,
[src]
impl<T> ElementwiseComparator<T> for FloatElementwiseComparator<T> where
T: Ulp + FloatCore + Display,
[src]