pub struct DfsTree {
pub order: Vec<VertexId>,
pub order_out: Vec<VertexId>,
pub parents: Vec<Option<VertexId>>,
pub dist: Vec<Option<u32>>,
}Expand description
Result of a multi-output DFS scan from a single root. Returned by
dfs_tree.
Fields§
§order: Vec<VertexId>Vertices reachable from the root, in DFS pre-order (discovery order).
order_out: Vec<VertexId>Vertices in DFS post-order (finish order).
parents: Vec<Option<VertexId>>parents[v] == Some(p) if v was DFS-discovered from p; None
for the root and for unreachable vertices.
dist: Vec<Option<u32>>dist[v] == Some(d) if v is reachable from the root at DFS-tree
depth d (0 for root); None if unreachable.
Trait Implementations§
impl Eq for DfsTree
impl StructuralPartialEq for DfsTree
Auto Trait Implementations§
impl Freeze for DfsTree
impl RefUnwindSafe for DfsTree
impl Send for DfsTree
impl Sync for DfsTree
impl Unpin for DfsTree
impl UnsafeUnpin for DfsTree
impl UnwindSafe for DfsTree
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