From 89df77962e0e8a5a0c3e6503f8ff1db425a7f87e Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 21 Jan 2021 10:07:05 +0100 Subject: [PATCH] Change argument order for select_heuristic() --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 328c0c5..c5599df 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -390,7 +390,7 @@ fn insert( layer.push(ZeroNode::default()); let found = match heuristic { None => search.select_simple(), - Some(heuristic) => search.select_heuristic(&layer, M * 2, &points[new], points, *heuristic), + Some(heuristic) => search.select_heuristic(&points[new], &layer, M * 2, points, *heuristic), }; // Just make sure the candidates are all unique @@ -528,14 +528,14 @@ impl Search { for pid in current { self.push(pid, point, points); } - self.select_heuristic(&layer, num, point, points, params) + self.select_heuristic(point, &layer, num, points, params) } fn select_heuristic( &mut self, + point: &P, layer: &[ZeroNode], num: usize, - point: &P, points: &[P], params: Heuristic, ) -> &[Candidate] {