Contains a list of nodes (in the Objects property) defining the shortest path between the node at index 0 and the current node.
This property is filled in by the EnumerateShortestPaths method of the TGCustomGraph class. After calling the EnumerateShortestPaths method, you can use this property to find the shortest path between the first node and this node. The Weight property will be filled in with the length or cost of getting from the start node to this node.
This property may be nil (if the EnumerateShortestPaths method is not called, directly or indirectly). When the node is destroyed, it will free the TStrings property if it is not nil.
Namespace: GGraph
Delphi |
published |
Property Value
Type: TStrings
The following example determines the shortest path beween two nodes (the graph (TGGraph class) is assumed to be full of TWeightedNodes and TWeightedEdges): Delphi |
var |