Expand description
Pure Rust implementation of the VF3 subgraph isomorphism algorithm.
This crate provides efficient subgraph isomorphism detection between directed and undirected graphs, with support for node and edge labels.
Modules§
Structs§
- Edge
Label - A label attached to an edge.
- Graph
- Represents a directed graph using compact adjacency lists for both outgoing and incoming edges.
Adjacency lists are stored as sorted, deduplicated
u32vectors for cache-friendly iteration and fast membership checks via binary search. - Lazy
DfsIter - Match
Query - Builder pattern for configuring subgraph matching queries.
- NodeId
- A node identifier in a graph.
- Node
Label - A label attached to a node.
- Prepared
- Prof
Counters - Terminal
Sets - VF3Options
Enums§
Functions§
- count_
subgraph_ matches_ with_ options - Count-only variant: returns the number of subgraph isomorphisms.
- find_
first_ match - Finds the first subgraph isomorphism between the pattern and target graphs.
- find_
matches - Create a new match query for finding subgraph isomorphisms.
- find_
subgraph_ matches - Finds all subgraph isomorphisms between the pattern and target graphs.
- find_
subgraph_ matches_ with_ options - for_
each_ match_ with_ options_ limited - Visit matches one-by-one without allocating the full results vector.
Returns the number of matches seen. Stops early if
limitis reached or the callback returns false. - is_
subgraph - Check if the pattern is a subgraph of the target (subgraph isomorphism test).
- is_
subgraph_ isomorphic - Determines if the pattern graph is isomorphic to a subgraph of the target graph.
- match_
iter_ non_ threaded_ with_ options - A simple, non-threaded iterator over matches. Currently backed by a one-shot collection; suitable for tests and simple usage.
- match_
iter_ with_ options - True lazy non-threaded iterator over matches using incremental DFS and backtracking.
- prof_
reset - Reset profiling counters (no-op when profiling is disabled).
- prof_
snapshot - Get empty profiling counters when profiling is disabled.
Type Aliases§
- Node
Mapping - Represents a mapping between nodes in the pattern and target graphs.