寻找最小割 2
将图切分为更小子图的另一个函数是 stMincuts()。它需要传入图对象和两个顶点的 ID,并返回使这两个顶点断开所需的最少割数(在函数输出的 value 元素中给出)。该函数的语法为:
stMincuts(graph, "node1", "node2")
本练习是课程的一部分
案例研究:用 R 进行网络分析
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Make an ego graph from the first partition
ego_partition1 <- ___(trip_g_ud, nodes = ___$partition1)[[1]]
# Plot the ego graph
plot(___)