From a0b90dfd667d36c41b53e8cec29b93579d04b205 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 21 Jan 2021 10:07:24 +0100 Subject: [PATCH] Add a docstring for select_heuristic() --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index c5599df..1bf32ee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -531,6 +531,9 @@ impl Search { 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( &mut self, point: &P,