fgl-5.5.2.2: Martin Erwig's Functional Graph Library

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Graph.Inductive.Query.BFS

Contents

Description

Breadth-First Search Algorithms

Synopsis

BFS Node List

bfs :: Graph gr => Node -> gr a b -> [Node] Source

bfsn :: Graph gr => [Node] -> gr a b -> [Node] Source

bfsWith :: Graph gr => (Context a b -> c) -> Node -> gr a b -> [c] Source

bfsnWith :: Graph gr => (Context a b -> c) -> [Node] -> gr a b -> [c] Source

Node List With Depth Info

level :: Graph gr => Node -> gr a b -> [(Node, Int)] Source

leveln :: Graph gr => [(Node, Int)] -> gr a b -> [(Node, Int)] Source

BFS Edges

bfe :: Graph gr => Node -> gr a b -> [Edge] Source

bfen :: Graph gr => [Edge] -> gr a b -> [Edge] Source

BFS Tree

bft :: Graph gr => Node -> gr a b -> RTree Source

lbft :: Graph gr => Node -> gr a b -> LRTree b Source

type RTree = [Path] Source

Shortest Path (Number of Edges)

esp :: Graph gr => Node -> Node -> gr a b -> Path Source

lesp :: Graph gr => Node -> Node -> gr a b -> LPath b Source