Path: | lib/rgl/traversal.rb |
Last Update: | Wed Apr 10 21:58:08 +0000 2013 |
traversal.rb
This file defines the basic graph traversal algorithm for DFS and BFS search. They are implemented as an RGL::GraphIterator, which is a Stream of vertices of a given graph. The streams are not reversable.
Beside being an iterator in the sense of the Stream mixin, RGL::BFSIterator and RGL::DFSIterator follow the BGL Visitor Concepts in a slightly modified fashion (especially for the RGL::DFSIterator).