Change argument order for select_heuristic()
This commit is contained in:
parent
640592b411
commit
89df77962e
|
@ -390,7 +390,7 @@ fn insert<P: Point>(
|
||||||
layer.push(ZeroNode::default());
|
layer.push(ZeroNode::default());
|
||||||
let found = match heuristic {
|
let found = match heuristic {
|
||||||
None => search.select_simple(),
|
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
|
// Just make sure the candidates are all unique
|
||||||
|
@ -528,14 +528,14 @@ impl Search {
|
||||||
for pid in current {
|
for pid in current {
|
||||||
self.push(pid, point, points);
|
self.push(pid, point, points);
|
||||||
}
|
}
|
||||||
self.select_heuristic(&layer, num, point, points, params)
|
self.select_heuristic(point, &layer, num, points, params)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn select_heuristic<P: Point>(
|
fn select_heuristic<P: Point>(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
point: &P,
|
||||||
layer: &[ZeroNode],
|
layer: &[ZeroNode],
|
||||||
num: usize,
|
num: usize,
|
||||||
point: &P,
|
|
||||||
points: &[P],
|
points: &[P],
|
||||||
params: Heuristic,
|
params: Heuristic,
|
||||||
) -> &[Candidate] {
|
) -> &[Candidate] {
|
||||||
|
|
Loading…
Reference in New Issue