1
0
mirror of https://github.com/osmarks/meme-search-engine.git synced 2025-04-07 03:06:56 +00:00

enforce r, oops

This commit is contained in:
osmarks 2025-01-16 21:36:15 +00:00
parent 9291eacead
commit 163dceca4b

View File

@ -360,7 +360,7 @@ pub fn robust_stitch(rng: &mut Rng, graph: &mut IndexGraph, vecs: &VectorList, c
let mut in_neighbour_out_edges = graph.out_neighbours_mut(in_neighbour);
let mut added = 0;
for (neigh, _score) in candidates {
if added >= config.max_add_per_stitch_iter {
if added >= config.max_add_per_stitch_iter || in_neighbour_out_edges.len() >= config.r {
break;
}
if in_neighbour_out_edges.contains(&neigh) {