networks(deprecated)/eweight - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : networks(deprecated)/eweight

networks

  

eweight

  

finds edgeweights in a graph

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

eweight(G)

eweight(e, G)

Parameters

G

-

graph or network

e

-

edge or list of edges

Description

• 

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

Examples

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

withnetworks:

newG:

addvertex1,2,3,G:

addedge1,2,2,3,1,3,weights=3,4,6,G

e1,e2,e3

(1)

eweightG

tablee2=4,e3=6,e1=3

(2)

eweighte1,G

3

(3)

eweighte1,e2,G

3,4

(4)

See Also

GraphTheory

GraphTheory[WeightMatrix]

networks(deprecated)[edges]

networks(deprecated)[vweight]