pub struct BfsTree {
pub order: Vec<VertexId>,
pub distances: Vec<Option<u32>>,
pub parents: Vec<Option<VertexId>>,
}Expand description
Result of a multi-output BFS scan from a single root. Returned by
bfs_tree.
Fields§
§order: Vec<VertexId>Vertices reachable from the root, in BFS visit order.
distances: Vec<Option<u32>>distances[v] == Some(d) if v is reachable from the root in
d edges (d == 0 for the root); None if unreachable.
parents: Vec<Option<VertexId>>parents[v] == Some(p) if v was BFS-discovered via p; None
for the root and for unreachable vertices.
Trait Implementations§
impl Eq for BfsTree
impl StructuralPartialEq for BfsTree
Auto Trait Implementations§
impl Freeze for BfsTree
impl RefUnwindSafe for BfsTree
impl Send for BfsTree
impl Sync for BfsTree
impl Unpin for BfsTree
impl UnsafeUnpin for BfsTree
impl UnwindSafe for BfsTree
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