Skip to content

Commit

Permalink
fix: Remove superfluous :GRAY assignment in depth first visit (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
monora committed Oct 18, 2022
1 parent 9187588 commit 256c2cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rgl/traversal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def depth_first_visit(u, vis = DFSVisitor.new(self), &b)

if vis.follow_edge?(u, v) # (u,v) is a tree edge
vis.handle_tree_edge(u, v) # also discovers v
vis.color_map[v] = :GRAY # color of v was :WHITE
# color of v was :WHITE. Will be marked :GRAY in recursion
depth_first_visit(v, vis, &b)
else # (u,v) is a non tree edge
if vis.color_map[v] == :GRAY
Expand Down

0 comments on commit 256c2cf

Please sign in to comment.