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

CommunityStructureAssignment

CommunityStructureAssignment[g]
gives the assignment of vertices of a graph g into communities.
  • The assignment groups the vertices into communities, such that there is a higher density of edges within communities than between them.
  • The following option can be given:
WeightedFalsewhether edges with higher weights are preferred during matching
This defines a small graph:
Needs["GraphUtilities`"]
In[2]:=
Click for copyable input
Out[2]=
This finds that the network is grouped into two communities:
In[3]:=
Click for copyable input
Out[3]=
This shows which vertex is in which community:
In[4]:=
Click for copyable input
Out[4]=
This plots the graph, coloring the vertices based on community assignment:
In[5]:=
Click for copyable input
Out[5]=