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