class Graphlb::Algorithms::BFS
- Graphlb::Algorithms::BFS
- Reference
- Object
Overview
Breadth 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 Breadth First Search finds the vertices that are reachable from the source vertex in a graph
Defined in:
graphlb/algorithms/breadth_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.