pub struct SubgraphMatchResult {
pub matches: Vec<Vec<i64>>,
pub patterns_found: usize,
pub computation_time_ms: u128,
pub bounded_hit: bool,
}Expand description
Result of subgraph isomorphism search.
Contains all matches found within the bounds, plus statistics about the search.
§Example
println!("Found {} matches", result.patterns_found);
println!("Computation took {} ms", result.computation_time_ms);
if result.bounded_hit {
println!("Search stopped early due to bounds");
}
for (i, mapping) in result.matches.iter().enumerate() {
println!("Match {}: pattern_node -> target_node", i);
for (pattern_idx, target_id) in mapping.iter().enumerate() {
println!(" Pattern node {} maps to target {}", pattern_idx, target_id);
}
}Fields§
§matches: Vec<Vec<i64>>All matches found.
Each match is a Vec
patterns_found: usizeNumber of patterns found (same as matches.len()).
This is provided as a convenience for quick access.
computation_time_ms: u128Time taken for computation in milliseconds.
High-precision timing using std::time::Instant.
bounded_hit: boolTrue if search stopped due to bounds.
Set to true if max_matches or timeout_ms limit was reached. Check this to determine if there might be more matches not found.
Implementations§
Trait Implementations§
Source§impl Clone for SubgraphMatchResult
impl Clone for SubgraphMatchResult
Source§fn clone(&self) -> SubgraphMatchResult
fn clone(&self) -> SubgraphMatchResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SubgraphMatchResult
impl RefUnwindSafe for SubgraphMatchResult
impl Send for SubgraphMatchResult
impl Sync for SubgraphMatchResult
impl Unpin for SubgraphMatchResult
impl UnsafeUnpin for SubgraphMatchResult
impl UnwindSafe for SubgraphMatchResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more