pub struct PathResult<W> {
pub distances: Vec<Option<W>>,
pub predecessors: Vec<Option<usize>>,
}Expand description
Single-source distances and predecessor forest.
Fields§
§distances: Vec<Option<W>>distances[v] is the shortest distance to v, or None if unreachable.
predecessors: Vec<Option<usize>>predecessors[v] is the node v was reached from on a shortest path.
Trait Implementations§
Source§impl<W: Clone> Clone for PathResult<W>
impl<W: Clone> Clone for PathResult<W>
Source§fn clone(&self) -> PathResult<W>
fn clone(&self) -> PathResult<W>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<W: Debug> Debug for PathResult<W>
impl<W: Debug> Debug for PathResult<W>
impl<W: Eq> Eq for PathResult<W>
Source§impl<W: PartialEq> PartialEq for PathResult<W>
impl<W: PartialEq> PartialEq for PathResult<W>
impl<W: PartialEq> StructuralPartialEq for PathResult<W>
Auto Trait Implementations§
impl<W> Freeze for PathResult<W>
impl<W> RefUnwindSafe for PathResult<W>where
W: RefUnwindSafe,
impl<W> Send for PathResult<W>where
W: Send,
impl<W> Sync for PathResult<W>where
W: Sync,
impl<W> Unpin for PathResult<W>where
W: Unpin,
impl<W> UnsafeUnpin for PathResult<W>
impl<W> UnwindSafe for PathResult<W>where
W: UnwindSafe,
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