| Calling Sequence | FindConnectedComponents(G)
| |||||||||
| Parameters |
| |||||||||
| Return Type | set(Graph) | |||||||||
| Synopsis | This function computes the set of connected components of a Graph, which are returned as a set of Graphs. The Graph is assumed to be undirected. The disconnected nodes are returned as singleton Graphs, i.e. a Graph with a single node. | |||||||||
| Examples | > G1 := Graph(Edges(Edge('a',1,2),Edge('b',2,3)), Nodes(1,2,3,4)):
> FindConnectedComponents(G1); {Graph(Edges(),Nodes(4)),Graph(Edges(Edge(a,1,2),Edge(b,2,3)),Nodes(1,2,3))}
| |||||||||
| See also | BipartiteGraph, Clique, DrawGraph, Edge, EdgeComplement, Edges, Graph, Graph_Rand, InduceGraph, MaxCut, MaxEdgeWeightClique, MST, Nodes, Path, RegularGraph, ShortestPath, TetrahedronGraph, VertexCover | |||||||||