R igraph 手册页

如果您从 R 中使用 igraph,请使用此选项

count_motifs {igraph}R 文档

图的 motif

描述

图的 motif 是具有明确结构的小型连通子图。这些函数在图中搜索各种 motif。

用法

count_motifs(graph, size = 3, cut.prob = rep(0, size))

参数

Graph 对象,即输入图。

size

motif 的大小。

cut.prob

数值向量,给出在特定级别切割搜索图的概率。它的长度应与 motif 的大小(size 参数)相同。默认情况下,不进行切割。

详细信息

count_motifs 计算图中给定大小的 motif 的总数。

count_motifs 返回一个数值标量。

参见

isomorphism_class

其他图的 motif:motifs(), sample_motifs()

示例

g <- barabasi.game(100)
motifs(g, 3)
count_motifs(g, 3)
sample_motifs(g, 3)

[包 igraph 版本 1.3.5 索引]