Last chance! 50% off unlimited learning
Sale ends in
isomorphic(graph1, graph2, method = c("auto", "direct", "vf2", "bliss"), ...)is_isomorphic_to(graph1, graph2, method = c("auto", "direct", "vf2", "bliss"),
...)
TRUE
if the graphs are isomorphic.FALSE
.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_isomorphisms
,
graph.count.isomorphisms.vf2
;
count_subgraph_isomorphisms
,
graph.count.subisomorphisms.vf2
;
graph.get.isomorphisms.vf2
,
isomorphisms
;
graph.get.subisomorphisms.vf2
,
subgraph_isomorphisms
;
graph.isoclass
,
graph.isoclass.subgraph
,
isomorphism_class
;
graph.isocreate
,
graph_from_isomorphism_class
;
graph.subisomorphic.lad
,
graph.subisomorphic.vf2
,
is_subgraph_isomorphic_to
,
subgraph_isomorphic
# create some non-isomorphic graphs
g1 <- graph_from_isomorphism_class(3, 10)
g2 <- graph_from_isomorphism_class(3, 11)
isomorphic(g1, g2)
# create two isomorphic graphs, by permuting the vertices of the first
g1 <- barabasi.game(30, m=2, directed=FALSE)
g2 <- permute(g1, sample(vcount(g1)))
# should be TRUE
isomorphic(g1, g2)
isomorphic(g1, g2, method = "bliss")
isomorphic(g1, g2, method = "vf2")
# 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)
Run the code above in your browser using DataLab