fgl-5.8.2.0: Martin Erwig's Functional Graph Library

Safe Haskell | Safe-Inferred
Language | Haskell98

Data.Graph.Inductive.Query.BFS

Contents

- BFS Node List
- Node List With Depth Info
- BFS Edges
- BFS Tree
- Shortest Path (Number of Edges)

Description

Breadth-First Search Algorithms

Synopsis

- bfs :: Graph gr => Node -> gr a b -> [Node]
- bfsn :: Graph gr => [Node] -> gr a b -> [Node]
- bfsWith :: Graph gr => (Context a b -> c) -> Node -> gr a b -> [c]
- bfsnWith :: Graph gr => (Context a b -> c) -> [Node] -> gr a b -> [c]
- level :: Graph gr => Node -> gr a b -> [(Node, Int)]
- leveln :: Graph gr => [(Node, Int)] -> gr a b -> [(Node, Int)]
- bfe :: Graph gr => Node -> gr a b -> [Edge]
- bfen :: Graph gr => [Edge] -> gr a b -> [Edge]
- bft :: Graph gr => Node -> gr a b -> RTree
- lbft :: Graph gr => Node -> gr a b -> LRTree b
- type RTree = [Path]
- esp :: Graph gr => Node -> Node -> gr a b -> Path
- lesp :: Graph gr => Node -> Node -> gr a b -> LPath b

# BFS Node List

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

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

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

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

# Node List With Depth Info

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

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

# BFS Edges

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

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

# BFS Tree

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

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

type RTree = [Path] #

# Shortest Path (Number of Edges)

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

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