pub struct DepGraphStats {
pub num_nodes: usize,
pub num_edges: usize,
pub num_rules: usize,
pub num_predicates: usize,
pub has_cycles: bool,
pub num_sccs: usize,
pub max_scc_size: usize,
pub num_strata: Option<usize>,
pub longest_dependency_chain: usize,
}Expand description
Summary statistics for a RuleDependencyGraph.
Fields§
§num_nodes: usizeTotal node count.
num_edges: usizeTotal edge count.
num_rules: usizeNumber of rule nodes.
num_predicates: usizeNumber of predicate nodes.
has_cycles: boolWhether the graph contains any directed cycle.
num_sccs: usizeNumber of strongly connected components.
max_scc_size: usizeSize of the largest SCC.
num_strata: Option<usize>Number of strata (None when the graph is not stratifiable).
longest_dependency_chain: usizeLength of the longest chain of dependencies (BFS diameter from any node).
Implementations§
Source§impl DepGraphStats
impl DepGraphStats
Sourcepub fn compute(graph: &RuleDependencyGraph) -> Self
pub fn compute(graph: &RuleDependencyGraph) -> Self
Compute statistics for the given graph.
Trait Implementations§
Source§impl Clone for DepGraphStats
impl Clone for DepGraphStats
Source§fn clone(&self) -> DepGraphStats
fn clone(&self) -> DepGraphStats
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 DepGraphStats
impl RefUnwindSafe for DepGraphStats
impl Send for DepGraphStats
impl Sync for DepGraphStats
impl Unpin for DepGraphStats
impl UnsafeUnpin for DepGraphStats
impl UnwindSafe for DepGraphStats
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