class

Graphlb::Algorithms::BFS

Inherits Reference / Object

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

Instance methods

run(graph, source)

returns a list of all vertices that are reachable from the source vertices.

Source