Previous Page Next Page Contents

Network::changeEdge -- changes weight and capacity of one or several edges

Introduction

Network::changeEdge(G, e, Eweight=c, Capacity=l) changes the weight of edge e in network G to c and its capacity to l.

Call(s)

Network::changeEdge(G, e <, Eweight=c> <, Capacity=t>)
Network::changeEdge(G, l <, Eweight=lc> <, Capacity=lt>)

Parameters

lc,lt - lists of numbers
c,t - numbers
l - list of edges
e - edge
G - network

Options

Eweight - change the weight of the edge
Capacity - change the capacity of the edge

Returns

The altered network

Details

Example 1

We construct a cyclic network with default weights. Then, those weights are changed.

>> N1 := Network::cycle([v1, v2, v3, v4]):
   Network::eWeight(N1)
                              table(
                                [v4, v1] = 1,
                                [v3, v4] = 1,
                                [v2, v3] = 1,
                                [v1, v2] = 1
                              )
>> N2 := Network::changeEdge(N1, [[v1,v2], [v2,v3]], Eweight=[2,2]):
   Network::eWeight(N2)
                              table(
                                [v4, v1] = 1,
                                [v3, v4] = 1,
                                [v2, v3] = 2,
                                [v1, v2] = 2
                              )

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000