 networks(deprecated)/vweight - Maple Help

networks

 vweight
 finds vertex weights in a graph Calling Sequence vweight(G) vweight(v, G) vweight(vlist, G) Parameters

 G - graph or network v - vertex or list of vertices vlist - vertex or list of vertices Description

 • Important: The networks package has been deprecated.Use the superseding package GraphTheory instead.
 • Given just the graph G the vertex weight table of the graph is returned. This is part of the internal data-structure of the graph and so changes to it affect the graph itself.
 • If a vertex is provided as the first argument then the weight of vlist is returned while if a list vlist of vertices is provided then a list of weights is returned.
 • Vertex weights are ordinarily 0 unless explicitly set to some other value by assignment to the weight table.  They may be assigned any valid maple object.
 • This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[vweight](...). Examples

Important: The networks package has been deprecated.Use the superseding package GraphTheory instead.

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $\mathrm{new}\left(G\right):$
 > $\mathrm{addvertex}\left(\left[1,2,3\right],\mathrm{weights}=\left[1,2,3\right],G\right):$
 > $\mathrm{vweight}\left(G\right)$
 ${table}{}\left({\mathrm{sparse}}{,}\left[{1}{=}{1}{,}{2}{=}{2}{,}{3}{=}{3}\right]\right)$ (1)
 > $\mathrm{vweight}\left(1,G\right)$
 ${1}$ (2)
 > $\mathrm{vweight}\left(\left[1,2\right],G\right)$
 $\left[{1}{,}{2}\right]$ (3)