Close
Close window
networks(deprecated)/shortpathtree - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


Home : Support : Online Help : networks(deprecated)/shortpathtree
[フレーム] [フレーム]

networks

shortpathtree

construct a shortest path spanning tree

Calling Sequence

shortpathtree(G, v)

Parameters

G

-

graph or network

v

-

vertex

Description

Important: The networks package has been deprecated .Use the superseding command GraphTheory[DijkstrasAlgorithm] instead.

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](...).

Examples

Important: The networks package has been deprecated .Use the superseding command GraphTheory[DijkstrasAlgorithm] instead.

>

withnetworks:

>

Gpetersen:

>

TshortpathtreeG,1:

>

ancestorT

table2=1,3=2,4=5,5=1,6=1,7=6,9=5,8=2,10=6

(1)
>

daughterT

table1=2,5,6,2=3,8,3=,4=,5=4,9,6=7,10,7=,9=,8=,10=

(2)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /