Trait sparse_interp::CloseTo [−][src]
A possibly-stateful comparison for exact or approximate types.
Implementors of this trait can be used to compare Item
s for
“closeness”. The idea is that closeness should encompass absolute
equality as well as approximate equality.
For exact types, use the CloseToEq struct to just fall back to direct comparison. For inexact types, use the RelativeParams struct to specify the acceptable (relative) error.
Associated Types
Loading content...Required methods
fn close_to(&self, x: &Self::Item, y: &Self::Item) -> bool
[src]
Returns true
iff x
is approximatey equal to y
.
fn close_to_zero(&self, x: &Self::Item) -> bool
[src]
Indicates true
if x
is approximately zero.
Provided methods
fn close_to_iter<'a, Iter1, Iter2>(&'a self, x: Iter1, y: Iter2) -> bool where
Iter1: Iterator<Item = &'a Self::Item>,
Iter2: Iterator<Item = &'a Self::Item>,
[src]
Iter1: Iterator<Item = &'a Self::Item>,
Iter2: Iterator<Item = &'a Self::Item>,
Checks closeness over an iteration.