vf2pp_all_monomorphisms#
- vf2pp_all_monomorphisms(FG, SG, node_label=None, default_label=None)[source]#
Yields all the possible monomorphisms between nodes of FG and SG.
A monomorphism is an injective version of an isomorphism. If two nodes in SG are connected by an edge, the pre-image nodes in FG must also be connected. But two mapped nodes connected by an edge in FG may not have an edge in SG. Maintaining both edges and non-edges (an induced subgraph) is provided by subgraph isomorphism functions.
- Parameters:
- FG, SGNetworkX Graph or MultiGraph instances.
The two graphs to check for isomorphism.
- node_labelstr, optional
The name of the node attribute to be used when comparing nodes. The default is
None, meaning node attributes are not considered in the comparison. Any node that doesn’t have the node_label attribute uses default_label instead.- default_labelscalar
Default value to use when a node doesn’t have an attribute named node_label. Default is
None.
- Yields:
- dict
Isomorphic mapping of the nodes in FG to nodes in SG.