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

Language | Haskell98 |

Shortest path algorithms

# Documentation

spTree :: (Graph gr, Real b) => Node -> gr a b -> LRTree b Source #

Tree of shortest paths from a certain node to the rest of the (reachable) nodes.

Corresponds to `dijkstra`

applied to a heap in which the only known node is
the starting node, with a path of length 0 leading to it.

The edge labels of type `b`

are the edge weights; negative edge
weights are not supported.