Methods

Files

RGL::DFSIterator

Iterator for a depth first search, starting at a given vertex. The only difference from BFSIterator is that @waiting is a stack, instead of a queue.

Note that this is different from DFSVisitor, which is used in the recursive version for depth first search (see depth_first_search).

Public Instance Methods

next_vertex() click to toggle source
# File lib/rgl/traversal.rb, line 260
def next_vertex
  # waiting is a stack
  @waiting.pop
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.