Previous Page Next Page Contents

Network::changeVertex -- changes the weight of one or several vertices in a network

Introduction

Network::changeVertex(G, v, Vweight=c) sets the weight of vertex v in network G to c.

Call(s)

Network::changeVertex(G, v <, Vweight=c>)
Network::changeVertex(G, l <, Vweight=lc>)

Parameters

c - a number
l - a list of nodes
v - a node of the network G
lc - a list of numbers
G - a network

Options

Vweight - the new weight(s) of the vertices

Returns

the augmented network

Details

Example 1

We generate a cyclic path with default weights. Then, the vertex weights are changed.

>> N1 := Network::cycle([v1,v2,v3,v4]):
   Network::vWeight(N1)
                                 table(
                                   v4 = 0,
                                   v3 = 0,
                                   v2 = 0,
                                   v1 = 0
                                 )
>> N2 := Network::changeVertex(N1, [v1,v2,v3,v4],
                               Vweight=[1,2,3,4]):
   Network::vWeight(N2)
                                 table(
                                   v4 = 4,
                                   v3 = 3,
                                   v2 = 2,
                                   v1 = 1
                                 )

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000