NetworkX

Previous topic

networkx.WeightedMultiDiGraphMatcher.syntactic_feasibility

Next topic

networkx.algorithms.isomorphism.could_be_isomorphic

networkx.algorithms.isomorphism.is_isomorphic

networkx.algorithms.isomorphism.is_isomorphic(G1, G2, weighted=False, rtol=9.9999999999999995e-07, atol=1.0000000000000001e-09)

Returns True if the graphs G1 and G2 are isomorphic and False otherwise.

Parameters :

G1, G2: NetworkX graph instances :

The two graphs G1 and G2 must be the same type.

weighted: bool, optional :

Optionally check isomorphism for weighted graphs. G1 and G2 must be valid weighted graphs.

rtol: float, optional :

The relative error tolerance when checking weighted edges

atol: float, optional :

The absolute error tolerance when checking weighted edges

See also

isomorphvf2

Notes

Uses the vf2 algorithm. Works for Graph, DiGraph, MultiGraph, and MultiDiGraph