Search in appropriate layer during construction

This commit is contained in:
Dirkjan Ochtman 2021-01-07 16:00:56 +01:00
parent bd9c3f3897
commit f61659cca5
1 changed files with 8 additions and 3 deletions

View File

@ -132,10 +132,15 @@ where
search.push(PointId(0), point, &points);
for cur in top.descend() {
search.ef = if cur <= layer { ef_construction } else { 1 };
zero.search(point, search, &points, num);
match cur > layer {
true => search.cull(),
false => break,
true => {
layers[cur.0 - 1].search(point, search, &points, num);
search.cull();
}
false => {
zero.search(point, search, &points, num);
break;
}
}
}
});