From df89c2d64f15a315003abdf0f966db900fbaa18f Mon Sep 17 00:00:00 2001 From: parsaeskandar Date: Tue, 13 Oct 2026 11:42:31 -0700 Subject: [PATCH] get_snarl_tree_records(): number root components across all temporary indexes With more than one temporary index, root components of later indexes reused root-record slots and connected component ranks starting from 0. Co-Authored-By: Claude Opus 5.5 --- bdsg/src/snarl_distance_index.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bdsg/src/snarl_distance_index.cpp b/bdsg/src/snarl_distance_index.cpp index 221f22fe..f1a23564 100644 --- a/bdsg/src/snarl_distance_index.cpp +++ b/bdsg/src/snarl_distance_index.cpp @@ -6259,6 +6259,9 @@ void SnarlDistanceIndex::get_snarl_tree_records(const vectorcomponents.size() ; component_num++){ const temp_record_ref_t& component_index = temp_index->components[component_num]; //Let the root record know that it has another root - root_record.add_component(component_num,record_to_offset[make_pair(temp_index_i,component_index)]); + root_record.add_component(component_offset + component_num,record_to_offset[make_pair(temp_index_i,component_index)]); SnarlTreeRecord record (record_to_offset[make_pair(temp_index_i, component_index)], &snarl_tree_records); @@ -6702,7 +6705,7 @@ void SnarlDistanceIndex::get_snarl_tree_records(const vectorcomponents.size(); }