Update sdk/platform-tools to version 26.0.0.
[android_tools.git] / sdk / platform-tools / systrace / catapult / telemetry / third_party / altgraph / doc / graphalgo.rst
blob84d492f44c90151d2c9027a0fd5fe08b82fab1a3
1 :mod:`altgraph.GraphAlgo` --- Graph algorithms
2 ==================================================
4 .. module:: altgraph.GraphAlgo
5    :synopsis: Basic graphs algoritms
7 .. function:: dijkstra(graph, start[, end])
9    Dijkstra's algorithm for shortest paths.
11    Find shortest paths from the  start node to all nodes nearer 
12    than or equal to the *end* node. The edge data is assumed to be the edge length.
14    .. note::
16        Dijkstra's algorithm is only guaranteed to work correctly when all edge lengths are positive.
17        This code does not verify this property for all edges (only the edges examined until the end
18        vertex is reached), but will correctly compute shortest paths even for some graphs with negative
19        edges, and will raise an exception if it discovers that a negative edge has caused it to make a mistake.
22 .. function:: shortest_path(graph, start, end)
24    Find a single shortest path from the given start node to the given end node.
25    The input has the same conventions as :func:`dijkstra`. The output is a list 
26    of the nodes in order along the shortest path.