如果您从 R 中使用 igraph,请使用此选项
count_isomorphisms {igraph} | R 文档 |
计算两个图之间同构映射的数量
count_isomorphisms(graph1, graph2, method = "vf2", ...)
graph1 |
第一个图。 |
graph2 |
第二个图。 |
method |
目前仅支持“vf2”,有关其详细信息和额外参数,请参见 |
... |
传递给各个方法。 |
两个图之间同构映射的数量。
LP Cordella, P Foggia, C Sansone, and M Vento: An improved algorithm for matching large graphs, Proc. of the 3rd IAPR TC-15 Workshop on Graphbased Representations in Pattern Recognition, 149–159, 2001.
其他图同构:count_subgraph_isomorphisms()
, graph_from_isomorphism_class()
, isomorphic()
, isomorphism_class()
, isomorphisms()
, subgraph_isomorphic()
, subgraph_isomorphisms()
# colored graph isomorphism
g1 <- make_ring(10)
g2 <- make_ring(10)
isomorphic(g1, g2)
V(g1)$color <- rep(1:2, length = vcount(g1))
V(g2)$color <- rep(2:1, length = vcount(g2))
# consider colors by default
count_isomorphisms(g1, g2)
# ignore colors
count_isomorphisms(g1, g2, vertex.color1 = NULL,
vertex.color2 = NULL)