Struct is_close::ComparatorBuilder [−][src]
pub struct ComparatorBuilder<T: Float> { /* fields omitted */ }
Expand description
Builder for Comparator
functions. It holds the following parameters:
rel_tol
: maximum difference for being considered close, relative to the magnitude of the input values. It defaults toDEFAULT_REL_TOL
.abs_tol
: maximum difference for being considered close, regardless of the magnitude of the input values. It defaults toDEFAULT_ABS_TOL
.method
: strategy of how to interpret relative tolerance. It defaults toMethod::Weak
.
Implementations
pub fn all_close<I, J>(&self, a: I, b: J) -> bool where
I: IntoIterator<Item = T>,
J: IntoIterator<Item = T>,
pub fn all_close<I, J>(&self, a: I, b: J) -> bool where
I: IntoIterator<Item = T>,
J: IntoIterator<Item = T>,
Shorthand for compile().all_close(a, b)
pub fn any_close<I, J>(&self, a: I, b: J) -> bool where
I: IntoIterator<Item = T>,
J: IntoIterator<Item = T>,
pub fn any_close<I, J>(&self, a: I, b: J) -> bool where
I: IntoIterator<Item = T>,
J: IntoIterator<Item = T>,
Shorthand for compile().any_close(a, b)
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for ComparatorBuilder<T> where
T: RefUnwindSafe,
impl<T> Send for ComparatorBuilder<T> where
T: Send,
impl<T> Sync for ComparatorBuilder<T> where
T: Sync,
impl<T> Unpin for ComparatorBuilder<T> where
T: Unpin,
impl<T> UnwindSafe for ComparatorBuilder<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more