R igraph manual pages

Use this if you are using igraph from R

count_isomorphisms {igraph}R Documentation

Count the number of isomorphic mappings between two graphs

Description

Count the number of isomorphic mappings between two graphs

Usage

count_isomorphisms(graph1, graph2, method = "vf2", ...)

Arguments

graph1

The first graph.

graph2

The second graph.

method

Currently only ‘vf2’ is supported, see isomorphic for details about it and extra arguments.

...

Passed to the individual methods.

Value

Number of isomorphic mappings between the two graphs.

References

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.

See Also

Other graph isomorphism: count_subgraph_isomorphisms(), graph_from_isomorphism_class(), isomorphic(), isomorphism_class(), isomorphisms(), subgraph_isomorphic(), subgraph_isomorphisms()

Examples

# 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)

[Package igraph version 1.3.5 Index]