NetworkX

Previous topic

networkx.GraphMatcher.syntactic_feasibility

Next topic

networkx.DiGraphMatcher.initialize

networkx.DiGraphMatcher.__init__

DiGraphMatcher.__init__(G1, G2)

Initialize DiGraphMatcher.

G1 and G2 should be nx.Graph or nx.MultiGraph instances.

Examples

To create a GraphMatcher which checks for syntactic feasibility:

>>> G1 = nx.DiGraph(nx.path_graph(4, create_using=nx.DiGraph()))
>>> G2 = nx.DiGraph(nx.path_graph(4, create_using=nx.DiGraph()))
>>> DiGM = nx.DiGraphMatcher(G1,G2)