## `Network::cycle` -- generates a cycle

#### Introduction

``Network::cycle`(L)` generates the cyclic network consisting of the nodes in `L`.

#### Call(s)

`Network::cycle(L)`

#### Parameters

`L` | - | list of expressions

#### Returns

a network

#### Details

- `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.

#### Example 1

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

#### Changes

- used to be called `Network::Cycle`

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000