networks
eweight
finds edgeweights in a graph
Calling Sequence
Parameters
Description
Examples
eweight(G)
eweight(e, G)
G
-
graph or network
e
edge or list of edges
Important: The networks package has been deprecated. Use the superseding command GraphTheory[WeightMatrix] instead.
This routine is used to determine the edge weights of edges in a graph G.
If the only parameter is a graph G then the edge weight table of the graph is returned. Any subsequent modifications of this table directly affect the graph.
The default edge weights are 1, but can be reassigned as any valid maple object. Procedures such as gsimp() can be provided with user defined rules for calculating new weights during the simplification of a graph.
If e is an edge then the weight of e is returned. If e is a list of edges then a list of weights is returned.
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[eweight](...).
with⁡networks:
new⁡G:
addvertex⁡1,2,3,G:
addedge⁡1,2,2,3,1,3,weights=3,4,6,G
e1,e2,e3
eweight⁡G
table⁡e2=4,e3=6,e1=3
eweight⁡e1,G
3
eweight⁡e1,e2,G
3,4
See Also
GraphTheory
GraphTheory[WeightMatrix]
networks(deprecated)[edges]
networks(deprecated)[vweight]
Download Help Document