pub struct DfsResult {
pub order: Vec<VertexId>,
pub order_out: Vec<VertexId>,
pub parents: Vec<Option<VertexId>>,
pub dist: Vec<Option<usize>>,
pub stopped: bool,
}Expand description
Results of a depth-first search (Graph::dfs, Graph::dfs_with).
Fields§
§order: Vec<VertexId>The vertices in the order they were discovered (pre-order).
order_out: Vec<VertexId>The vertices in the order their subtrees were completed (post-order).
If the search was stopped early, it may be shorter than
order.
parents: Vec<Option<VertexId>>The parent of each vertex in the DFS forest: None for the roots of
the search trees and for unvisited vertices.
dist: Vec<Option<usize>>The depth of each vertex in its DFS tree (the number of tree edges
between it and the root of its tree), None if not visited. Unlike
the raw output of igraph_dfs, it stays exact after a restart with
DfsOptions::unreachable (see the module docs).
stopped: booltrue if the visitor closure returned ControlFlow::Break.
Implementations§
Trait Implementations§
impl Eq for DfsResult
impl StructuralPartialEq for DfsResult
Auto Trait Implementations§
impl Freeze for DfsResult
impl RefUnwindSafe for DfsResult
impl Send for DfsResult
impl Sync for DfsResult
impl Unpin for DfsResult
impl UnsafeUnpin for DfsResult
impl UnwindSafe for DfsResult
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