Class: Turbine::Traversal::DepthFirst
- Defined in:
- lib/turbine/traversal/depth_first.rb
Overview
Traverses the graph depth-first, following each edge from a node to its adjacent nodes, and to their adjacent nodes, etc…
A
/ \
B C
/ / \
D E F
/ /
G H
In the above graph, using a depth-first algorithm, starting from A, the nodes are traversed in the order B -> D -> G -> C -> E -> H -> F.
Method Summary
Methods inherited from Base
#initialize, #inspect, #next, #to_enum
Constructor Details
This class inherits a constructor from Turbine::Traversal::Base