Add a docstring for select_heuristic()

This commit is contained in:
Dirkjan Ochtman 2021-01-21 10:07:24 +01:00
parent 89df77962e
commit a0b90dfd66
1 changed files with 3 additions and 0 deletions

View File

@ -531,6 +531,9 @@ impl Search {
self.select_heuristic(point, &layer, num, points, params) self.select_heuristic(point, &layer, num, points, params)
} }
/// Heuristically sort and truncate neighbors in `self.nearest`
///
/// Invariant: `self.nearest` must be in sorted (nearest first) order.
fn select_heuristic<P: Point>( fn select_heuristic<P: Point>(
&mut self, &mut self,
point: &P, point: &P,