networks[shortpathtree] - construct a shortest path spanning tree
|
Calling Sequence
|
|
shortpathtree(G, v)
|
|
Parameters
|
|
G
|
-
|
graph or network
|
v
|
-
|
vertex
|
|
|
|
|
Description
|
|
•
|
This is an implementation of Dijkstra's algorithm for shortest path spanning tree. A priority queue is used for storing the edges.
|
•
|
The final distances are recorded as the vertex weights in the resulting graph (a spanning tree). The tree is rooted at v and the ancestors and daughters of each node are computed relative to this tree.
|
•
|
Edge weights are assumed to be lengths or distances so that edge weights are required to be non-negative. Undirected edges are assumed to be bidirectional.
|
•
|
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[shortpathtree](...).
|
|
|
Download Help Document
Was this information helpful?