pub trait KDTreeOptimized<T: Float + Send + Sync + 'static, D> {
// Required methods
fn directed_hausdorff_distance(
&self,
points: &ArrayView2<'_, T>,
seed: Option<u64>,
) -> SpatialResult<(T, usize, usize)>;
fn hausdorff_distance(
&self,
points: &ArrayView2<'_, T>,
seed: Option<u64>,
) -> SpatialResult<T>;
fn batch_nearest_neighbor(
&self,
points: &ArrayView2<'_, T>,
) -> SpatialResult<(Array1<usize>, Array1<T>)>;
}Expand description
Extension trait to add optimized operations to the KDTree
Required Methods§
Sourcefn directed_hausdorff_distance(
&self,
points: &ArrayView2<'_, T>,
seed: Option<u64>,
) -> SpatialResult<(T, usize, usize)>
fn directed_hausdorff_distance( &self, points: &ArrayView2<'_, T>, seed: Option<u64>, ) -> SpatialResult<(T, usize, usize)>
Compute the directed Hausdorff distance from one point set to another using KD-tree acceleration
This method is significantly faster than the standard directed_hausdorff function for large point sets.
§Arguments
points- The points to compute distance toseed- Optional seed for random shuffling
§Returns
- A tuple containing the directed Hausdorff distance, and indices of the points realizing this distance