Skip to content

Commit e7893c1

Browse files
committed
Fix coloring.jl
1 parent 1624427 commit e7893c1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/coloring.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,12 +618,12 @@ function postprocess!(
618618
for k in eachindex(reverse_bfs_orders)
619619
reverse_bfs_order = reverse_bfs_orders[k]
620620
# Check if we have exactly one edge in the tree
621-
if length(vertices_by_tree[k]) == 1
622-
(i, j) = reverse_bfs_orders[k][1]
621+
if length(reverse_bfs_order) == 1
622+
(i, j) = reverse_bfs_order[1]
623623
if color_used[color[i]]
624624
# Make i the root to avoid possibly adding one more used color
625625
# Switch it with the (only) leaf
626-
reverse_bfs_orders[k][1] = (j, i)
626+
reverse_bfs_order[1] = (j, i)
627627
else
628628
# Keep j as the root
629629
color_used[color[j]] = true

0 commit comments

Comments
 (0)