Safe Haskell | None |
---|---|

Language | Haskell2010 |

- dfs :: forall s w v e f. PlanarGraph s w v e f -> VertexId s w -> Tree (VertexId s w)
- type AdjacencyLists s w = Vector [VertexId s w]
- adjacencyLists :: PlanarGraph s w v e f -> AdjacencyLists s w
- dfs' :: forall s w. AdjacencyLists s w -> VertexId s w -> Tree (VertexId s w)

# Documentation

dfs :: forall s w v e f. PlanarGraph s w v e f -> VertexId s w -> Tree (VertexId s w) Source

DFS on a planar graph.

Running time: $O(n)$

Note that since our planar graphs are always connected there is no need need for dfs to take a list of start vertices.

type AdjacencyLists s w = Vector [VertexId s w] Source

Adjacency list representation of a graph: for each vertex we simply list all connected neighbours.

adjacencyLists :: PlanarGraph s w v e f -> AdjacencyLists s w Source

Transform into adjacencylist representation