63.40 ConnectedComponents

ConnectedComponents( gamma )

This function returns a list of the vertex sets of the connected components of gamma, which must be a simple graph.

See also ConnectedComponent.

    gap> ConnectedComponents( NullGraph( Group((1,2,3,4)) ) );
    [ [ 1 ], [ 2 ], [ 3 ], [ 4 ] ]
    gap> ConnectedComponents( JohnsonGraph(4,2) );
    [ [ 1, 2, 3, 4, 5, 6 ] ] 

Previous Up Top Next
Index

GAP 3.4.4
April 1997