Skip to content

Commit

Permalink
Handle holes in graph node indices
Browse files Browse the repository at this point in the history
  • Loading branch information
InnovativeInventor committed May 27, 2022
1 parent 6634fdf commit 889dff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pub fn bipartition_tree(
let mut pops = pops;
let spanning_tree_graph = &spanning_tree.graph;
let mut same_partition_tracker: Vec<Vec<usize>> =
vec![vec![]; spanning_tree_graph.node_count()]; // Keeps track of all all the nodes on the same side of the partition
vec![vec![]; spanning_tree_graph.node_bound()]; // Keeps track of all all the nodes on the same side of the partition

let mut node_queue: VecDeque<NodeIndex> = VecDeque::<NodeIndex>::new();
for leaf_node in spanning_tree_graph.node_indices() {
Expand Down

0 comments on commit 889dff5

Please sign in to comment.