Suppose I have 2 graphs A and B, and I want to know if A is a subgraph of B. Nodes contain attributes such as "size" and "material".
When I run:
GM = networkx.algorithms.isomorphism.GraphMatcher(B,A)
print networkx.algorithms.isomorphism.subgraph_is_isomorphic()
This only matches the graph along the edges and not along the edges and attribute.
Any clue on how to check attributes?
In addition, let B contain 2 connected graphs A.
When I run:
GM.mapping
This only outputs 1 from subgraphs A. Any idea on how to output each subgraph?
source
share