Network::cycle
-- generates a
cycle
generates the cyclic
network consisting of the nodes in Network::cycle
(L)L
.
Network::cycle(L)
L |
- | list of expressions |
a network
Network::cycle
([v1,...,vn])
generates a
new network which is the cycle [v1,v2]
,
[v2,v3]
, ..., [vn,v1]
. The values for the
edge weights, edge capacities and vertex weights are the default values
1, 1 and 0 respectively.The cyclic network with four vertices:
>> N1 := Network::cycle([$1..4]): Network::printGraph(N1)
Vertices: [1, 2, 3, 4] Edges: [[1, 2], [2, 3], [3, 4], [4, 1]] Vertex weights: table(4=0,3=0,2=0,1=0) Edge capacities: table([4, 1]=1,[3, 4]=1,[2, 3]=1,[1, 2]=1) Edge weights: table([4, 1]=1,[3, 4]=1,[2, 3]=1,[1, 2]=1) Adjacency list (out): table(4=[1],3=[4],2=[3],1=[2]) Adjacency list (in): table(4=[3],3=[2],2=[1],1=[4])
Network::Cycle