Crate vf3

Crate vf3 

Source
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§

io

Structs§

EdgeLabel
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 u32 vectors for cache-friendly iteration and fast membership checks via binary search.
LazyDfsIter
MatchQuery
Builder pattern for configuring subgraph matching queries.
NodeId
A node identifier in a graph.
NodeLabel
A label attached to a node.
Prepared
ProfCounters
TerminalSets
VF3Options

Enums§

GraphError

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 limit is 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§

NodeMapping
Represents a mapping between nodes in the pattern and target graphs.