pub trait Region {
// Required methods
fn dim(&self) -> usize;
fn center(&self) -> &[f32];
fn distance_to_point(&self, point: &[f32]) -> f32;
fn contains(&self, point: &[f32]) -> bool;
}Expand description
A geometric region in d-dimensional space.
Regions have a center point (used for ANN candidate retrieval), a distance function from an external point to the region surface, and a containment predicate.
Required Methods§
Sourcefn distance_to_point(&self, point: &[f32]) -> f32
fn distance_to_point(&self, point: &[f32]) -> f32
Minimum L2 distance from point to the region surface.
Returns 0.0 if the point is inside the region.