networkx 2.8.2 Pypi GitHub Homepage
Other Docs
AttributesNotes

Attributes

graph: networkx.Graph :
subgraph: networkx.Graph :
node_equality: collections.abc.Callable :

The function called to see if two nodes should be considered equal. It's signature looks like this: f(graph1: networkx.Graph, node1, graph2: networkx.Graph, node2) -> bool . :None:None:`node1` is a node in :None:None:`graph1`, and :None:None:`node2` a node in :None:None:`graph2`. Constructed from the argument :None:None:`node_match`.

edge_equality: collections.abc.Callable :

The function called to see if two edges should be considered equal. It's signature looks like this: f(graph1: networkx.Graph, edge1, graph2: networkx.Graph, edge2) -> bool . :None:None:`edge1` is an edge in :None:None:`graph1`, and :None:None:`edge2` an edge in :None:None:`graph2`. Constructed from the argument :None:None:`edge_match`.

Notes

The implementation imposes additional conditions compared to the VF2 algorithm on the graphs provided and the comparison functions ( node_equality and edge_equality ):

Implements the ISMAGS subgraph matching algorith. ISMAGS stands for "Index-based Subgraph Matching Algorithm with General Symmetries". As the name implies, it is symmetry aware and will only generate non-symmetric isomorphisms.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/algorithms/isomorphism/ismags.py#227
type: <class 'type'>
Commit: