traversal.rb

Path: lib/rgl/traversal.rb
Last Update: Sat Dec 15 08:11:29 +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).

Required files

rgl/base   rubygems   stream   rgl/adjacency  

[Validate]