Last Modified
2013-08-06 00:27:40 +0000
Requires
  • rgl/base
  • rubygems
  • stream
  • rgl/adjacency

Description

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).