networks
vweight
finds vertex weights in a graph
Calling Sequence
Parameters
Description
Examples
vweight(G)
vweight(v, G)
vweight(vlist, G)
G
-
graph or network
v
vertex or list of vertices
vlist
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](...).
with⁡networks:
new⁡G:
addvertex⁡1,2,3,weights=1,2,3,G:
vweight⁡G
table⁡sparse,1=1,2=2,3=3
vweight⁡1,G
1
vweight⁡1,2,G
1,2
See Also
GraphTheory
networks(deprecated)[eweight]
networks(deprecated)[head]
networks(deprecated)[tail]
with
Download Help Document