Network::complete -- generates
a complete network
Introduction generates the
complete network with Network::complete(n)n vertices.
Call(s)Network::complete(n)
Parametersn |
- | non negative integer |
Returnsa network
DetailsNetwork::complete(n) generates the
complete network with n vertices. A complete network has a
connection between each pair of vertices.Network::complete uses the
default values of 1 for vertex weights, edge weights and edge
capacities.1 to n.
Example
1The complete network with three vertices has 3!=6 edges.
>> N1 := Network::complete(3): Network::printGraph(N1)
Vertices: [1, 2, 3]
Edges: [[1, 2], [1, 3], [2, 1], [2, 3], [3, 1], [3, 2]]
Vertex weights: table(3=0,2=0,1=0)
Edge capacities: table([3, 2]=1,[3, 1]=1,[2, 3]=1,[2, 1]=1,[1,\
3]=1,[1, 2]=1)
Edge weights: table([3, 2]=1,[3, 1]=1,[2, 3]=1,[2, 1]=1,[1, 3]\
=1,[1, 2]=1)
Adjacency list (out): table(3=[1, 2],2=[1, 3],1=[2, 3])
Adjacency list (in): table(3=[1, 2],2=[1, 3],1=[2, 3])
Network::Complete