replaces a group of nodes with a single node
g1 = supernode(v,g)
row vector, nodes numbers
graph data structure of the new graph
supernode
returns the graph g1
with the nodes with numbers given
by the vector v
being contracted in a single node. The number of the
supernode is the lowest number in v
. The characteristics of the old nodes
and edges are preserved. The supernode is located at the mean center of
v
. Its diameter and border are twice the previous of the replaced node.
The demand of the new node, if it exists, is the sum of the demands of the shrunken nodes.