Safe Haskell | None |
---|

- kruskal :: (Ord v, Ord e) => Graph v e -> Graph v e
- dfs :: Eq v => v -> Graph e v -> [v]
- bfs :: Eq v => v -> Graph e v -> [v]
- dijkstra :: (Eq v, Ord v) => Graph Int v -> v -> DijkstraState Int v
- data DijkstraState e v
- underlyingGraph :: Lens' (DijkstraState e v) (Graph e v)
- distancePairings :: Lens' (DijkstraState e v) (Map v Int)
- prevs :: Lens' (DijkstraState e v) (Map v (Maybe v))
- unvisited :: Lens' (DijkstraState e v) [v]
- visited :: Lens' (DijkstraState e v) [v]
- from :: Lens' (DijkstraState e v) v

# Documentation

dijkstra :: (Eq v, Ord v) => Graph Int v -> v -> DijkstraState Int vSource

Run dijkstra's algorithm on a graph starting at vertex v

data DijkstraState e v Source

Container for Dijkstra's algorithm information

(Eq e, Eq v) => Eq (DijkstraState e v) | |

(Show e, Show v) => Show (DijkstraState e v) |

underlyingGraph :: Lens' (DijkstraState e v) (Graph e v)Source

distancePairings :: Lens' (DijkstraState e v) (Map v Int)Source

unvisited :: Lens' (DijkstraState e v) [v]Source

visited :: Lens' (DijkstraState e v) [v]Source

from :: Lens' (DijkstraState e v) vSource