petgraph::algo::isomorphism

Function subgraph_isomorphisms_iter

Source
pub fn subgraph_isomorphisms_iter<'a, G0, G1, NM, EM>(
    g0: &'a G0,
    g1: &'a G1,
    node_match: &'a mut NM,
    edge_match: &'a mut EM,
) -> Option<impl Iterator<Item = Vec<usize>> + 'a>
Expand description

Using the VF2 algorithm, examine both syntactic and semantic graph isomorphism (graph structure and matching node and edge weights) and, if g0 is isomorphic to a subgraph of g1, return the mappings between them.

The graphs should not be multigraphs.