Skip to content

Commit

Permalink
fix visited_range initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaGuarracino committed Feb 2, 2025
1 parent cb622c6 commit f0d77bf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/impg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,12 @@ impl Impg {
.map(|(&k, v)| (k, (*v).clone()))
.collect()
} else {
FxHashMap::with_capacity_and_hasher(self.seq_index.len(), Default::default())
(0..self.seq_index.len() as u32)
.map(|id| {
let len = self.seq_index.get_len_from_id(id).unwrap();
(id, SortedRanges::new(len as i32, min_distance_between_ranges))
})
.collect()
};
// Initialize first visited range for target_id if not already present
visited_ranges.entry(target_id)
Expand Down

0 comments on commit f0d77bf

Please sign in to comment.