Trait cogset::Point
[−]
[src]
pub trait Point { fn dist(&self, other: &Self) -> f64; fn dist_lower_bound(&self, other: &Self) -> f64 { ... } }
A point in some (metric) space.
Required Methods
fn dist(&self, other: &Self) -> f64
Accurate compute the distance from self
to other
.
This should be real and non-negative, or else algorithms may return unexpected results.
Provided Methods
fn dist_lower_bound(&self, other: &Self) -> f64
Compute an estimate of the distance from self
to other
.
This should be less than or equal to self.dist(other)
or
else algorithms may return unexpected results.
Implementors
impl Point for Euclid<[f64; 1]>
impl Point for Euclid<[f64; 2]>
impl Point for Euclid<[f64; 3]>
impl Point for Euclid<[f64; 4]>
impl Point for Euclid<[f64; 5]>
impl Point for Euclid<[f64; 6]>
impl Point for Euclid<[f64; 7]>
impl Point for Euclid<[f64; 8]>
impl Point for Euclid<[f64; 9]>
impl Point for Euclid<[f64; 10]>
impl Point for Euclid<[f64; 11]>
impl Point for Euclid<[f64; 12]>