class Graphlb::Algorithms::DFS
- Graphlb::Algorithms::DFS
- Reference
- Object
Overview
Depth first Search is an algorithm for finding all the vertices that are reachable from a source, vertex in a graph.
Given a graph and source vertex Depth First Search finds the vertices that are reachable from the source vertex in a graph
Defined in:
graphlb/algorithms/depth_first_search.crInstance Method Summary
-
#run(graph, source)
returns a list of all vertices that are reachable from the source vertices.
Instance Method Detail
def run(graph, source)
#
returns a list of all vertices that are reachable from the source vertices.