Skip to content

Commit a12c312

Browse files
authored
Update coloring.jl
1 parent b221a5d commit a12c312

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
@@ -314,10 +314,10 @@ function _prevent_cycle!(
314314
forbidden_colors::AbstractVector{<:Integer},
315315
forest::Forest{<:Integer},
316316
)
317-
id = find_root!(forest, index_wx) # The edge wx belongs to the 2-colored tree T, represented by an edge with an integer ID
318-
(p, q) = first_visit_to_tree[id]
317+
root_wx = find_root!(forest, index_wx) # The edge wx belongs to the 2-colored tree T, represented by an edge with an integer ID
318+
(p, q) = first_visit_to_tree[root_wx]
319319
if p != v # T is being visited from vertex v for the first time
320-
first_visit_to_tree[id] = (v, w)
320+
first_visit_to_tree[root_wx] = (v, w)
321321
elseif q != w # T is connected to vertex v via at least two edges
322322
forbidden_colors[color[x]] = v
323323
end

0 commit comments

Comments
 (0)