Show/Hide Toolbars

RiverSoftAVG Products Help

Navigation: Code Documentation > RSCommon > GGraph > Classes > TGCustomGraph > Methods

TGCustomGraph.ShortestPath(TGGraphNode) Method

Scroll Prev Top Next More

Finds the lengths of the shortest paths from the given node to every other node in the graph. After calling this method, the Weight property of every node equals the shortest path length between the StartNode parameter and that node.

Use    EnumerateShortestPaths to not only find the length between nodes but also the actual shortest path.


The ShortestPath method only works with weighted graphs (a graph of TWeightedNodes and TWeightedEdges).

Namespace: GGraph



Type: TGGraphNode

RiverSoftAVG Products Help © 1996-2016 Thomas G. Grubb