此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)

WeakComponents

WeakComponents[g]
gives a list of all weakly connected components in the undirected graph g.
  • A weakly connected component of a directed graph is a set of vertices such that for each pair of vertices, there is a path between them. The graph g is considered as undirected.
Needs["GraphUtilities`"]
This shows that the following graph has 2 weakly connected components:
In[2]:=
Click for copyable input
Out[2]=