Trait rulinalg::macros::ElementwiseComparator
[−]
[src]
pub trait ElementwiseComparator<T, E> where T: Copy, E: ComparisonFailure {
fn compare(&self, x: T, y: T) -> Result<(), E>;
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.
Required Methods
fn compare(&self, x: T, y: T) -> Result<(), E>
Compares two elements.
Returns the error associated with the comparison if it failed.
fn description(&self) -> String
A description of the comparator.
Implementors
impl<T> ElementwiseComparator<T, AbsoluteError<T>> for AbsoluteElementwiseComparator<T> where T: Copy + Display + Num + PartialOrd<T>
impl<T> ElementwiseComparator<T, ExactError> for ExactElementwiseComparator where T: Copy + Display + PartialEq<T>
impl<T> ElementwiseComparator<T, UlpError> for UlpElementwiseComparator where T: Copy + Ulp
impl<T> ElementwiseComparator<T, UlpError> for FloatElementwiseComparator<T> where T: Copy + Ulp + Float + Display