pub struct TransitiveClosureBounds {
pub max_depth: Option<usize>,
pub max_sources: Option<usize>,
pub max_pairs: Option<usize>,
}Expand description
Bounds for transitive closure computation.
Transitive closure can be expensive on large graphs (O(|V|²) space). Use bounds to limit computation to a manageable subset.
§Fields
max_depth- Maximum traversal depth from each source (None = unlimited)max_sources- Maximum number of source nodes to process (None = all)max_pairs- Stop after this many reachable pairs found (None = unlimited)
§Example
ⓘ
use sqlitegraph::algo::TransitiveClosureBounds;
// Limit to depth 3, process first 100 sources
let bounds = TransitiveClosureBounds {
max_depth: Some(3),
max_sources: Some(100),
max_pairs: None,
};Fields§
§max_depth: Option<usize>Maximum depth to traverse from each source node.
None means unlimited depth (full reachability).
Some(1) means only direct neighbors.
max_sources: Option<usize>Maximum number of source nodes to process.
None means process all nodes as sources.
Some(n) limits to the first n nodes from all_entity_ids().
max_pairs: Option<usize>Maximum number of reachable pairs to compute.
None means compute all pairs.
Some(n) stops early after n pairs found.
Implementations§
Source§impl TransitiveClosureBounds
impl TransitiveClosureBounds
Sourcepub fn with_depth(max_depth: usize) -> Self
pub fn with_depth(max_depth: usize) -> Self
Sourcepub fn with_sources(max_sources: usize) -> Self
pub fn with_sources(max_sources: usize) -> Self
Trait Implementations§
Source§impl Clone for TransitiveClosureBounds
impl Clone for TransitiveClosureBounds
Source§fn clone(&self) -> TransitiveClosureBounds
fn clone(&self) -> TransitiveClosureBounds
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 moreSource§impl Debug for TransitiveClosureBounds
impl Debug for TransitiveClosureBounds
Source§impl Default for TransitiveClosureBounds
impl Default for TransitiveClosureBounds
Source§fn default() -> TransitiveClosureBounds
fn default() -> TransitiveClosureBounds
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TransitiveClosureBounds
impl RefUnwindSafe for TransitiveClosureBounds
impl Send for TransitiveClosureBounds
impl Sync for TransitiveClosureBounds
impl Unpin for TransitiveClosureBounds
impl UnwindSafe for TransitiveClosureBounds
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