Method: RGL::BipartiteBFSIterator#handle_tree_edge
- Defined in:
- lib/rgl/bipartite.rb
#handle_tree_edge(u, v) ⇒ Object
67 68 69 |
# File 'lib/rgl/bipartite.rb', line 67 def handle_tree_edge(u, v) @bipartite_sets_map[v] = (@bipartite_sets_map[u] + 1) % 2 unless u.nil? # put v into the other set end |