pub struct ReachabilityMatrix { /* private fields */ }Expand description
可达性矩阵
Implementations§
Source§impl ReachabilityMatrix
impl ReachabilityMatrix
Sourcepub fn from_graph(graph: &DirectedGraph) -> Self
pub fn from_graph(graph: &DirectedGraph) -> Self
从图构建可达性矩阵
Sourcepub fn is_reachable(&self, from: NodeId, to: NodeId) -> bool
pub fn is_reachable(&self, from: NodeId, to: NodeId) -> bool
检查 from 是否可达 to
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
节点数
Sourcepub fn reachable_pairs(&self) -> usize
pub fn reachable_pairs(&self) -> usize
可达对数
Sourcepub fn total_pairs(&self) -> usize
pub fn total_pairs(&self) -> usize
总对数
Sourcepub fn reachability_rate(&self) -> f64
pub fn reachability_rate(&self) -> f64
可达率
Auto Trait Implementations§
impl Freeze for ReachabilityMatrix
impl RefUnwindSafe for ReachabilityMatrix
impl Send for ReachabilityMatrix
impl Sync for ReachabilityMatrix
impl Unpin for ReachabilityMatrix
impl UnsafeUnpin for ReachabilityMatrix
impl UnwindSafe for ReachabilityMatrix
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