Scilab function

supernode - replaces a group of nodes with a single node

Calling Sequence

g1 = supernode(v,g)

Parameters

Description

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.

Examples

See Also