Path: | lib/rgl/traversal.rb |
Last Update: | Tue Dec 04 16:44:35 +0000 2007 |
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).