networks
shrink
shrink identifies a group of vertices as a single vertex
Calling Sequence
Parameters
Description
Examples
shrink(v1, G)
shrink(v1, G, vname)
G
-
graph or network
v1
set of vertices of G
vname
name for coalesced vertex
Important: The networks package has been deprecated.Use the superseding package GraphTheory instead.
This routine replaces v1 with a single new vertex in G and returns as its value the name of that the shrunken vertex.
The default name of the new vertex is an arbitrary one of the vertices in the subgraph being shrunk, or vname if such a name has been provided.
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[shrink](...).
with⁡networks:
G≔petersen⁡:
ends⁡convert⁡edges⁡G,list,G
1,2,6,10,1,6,2,8,3,10,4,7,5,9,2,3,3,4,4,5,1,5,6,7,7,8,8,9,9,10
shrink⁡1,2,3,6,9,G,SuperNode
SuperNode
vertices⁡G
4,5,7,8,10,SuperNode
10,SuperNode,8,SuperNode,10,SuperNode,4,7,5,SuperNode,4,SuperNode,4,5,5,SuperNode,7,SuperNode,7,8,8,SuperNode,10,SuperNode
See Also
GraphTheory
networks(deprecated)[complement]
networks(deprecated)[contract]
networks(deprecated)[induce]
with
Download Help Document