__construct() __construct(object $graph) Constructor for the BFS algorithm. Parameters object $graph The graph to which the BFS algorithm should be applied
run() run(mixed $root) Runs the BFS from a given vertex $vertex on the graph. Parameters mixed $root ID of the vertex from which the BFS should begin
get() get() : array Returns the result of the BFS. Returns array — Array of vertex distance to root, parents and vertices in BFS order