hgeometry-combinatorial-0.13: Data structures, and Data types.
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Algorithms.Graph.BFS

Description

 
Synopsis

Documentation

bfs :: Foldable f => Int -> Vector (v, f Int) -> Tree v Source #

Runs a BFS from the first vertex in the graph. The graph is given in adjacency list representation.

running time: \(O(V + E)\)

bfs' :: Foldable f => Int -> Vector (f Int) -> Tree Int Source #

Runs a BFS from the first vertex in the graph. The graph is given in adjacency list representation.

running time: \(O(V + E)\)