Network::vWeight -- returns the
table of vertex weights
Introduction yields the table of
the vertex weights of the network Network::vWeight(G)G.
Call(s)Network::vWeight(G)
ParametersG |
- | network |
Returnsa table
DetailsNetwork::vWeight(G) returns a table with
the vertex weight of the network G. Thus
Network::vWeight(G)[v] is the weight of vertex
v in the network G.
Example
1>> V := [1,2,3,4,5]: Vw := [25,0,0,0,-25]: Ed := [[1,2], [1,3], [2,3], [2,4], [3,4], [3,5], [4,5]]: N1 := Network(V,Ed, Vweight=Vw):
>> Network::vWeight(N1)
table(
5 = -25,
4 = 0,
3 = 0,
2 = 0,
1 = 25
)
Example
2>> N2 := Network::complete(5): Network::vWeight(N2)
table(
5 = 0,
4 = 0,
3 = 0,
2 = 0,
1 = 0
)
Network::VWeight