pub struct ShortestPath<N> {
pub source: usize,
pub goal: usize,
pub nodes: Vec<N>,
pub distance: Option<i64>,
pub certificate: ShortestPathCertificate,
}Expand description
One shortest path between two nodes, with a verifiable predecessor-tree certificate for the source.
Fields§
§source: usizeSource node.
goal: usizeGoal node.
nodes: Vec<N>Node labels along the selected shortest path, including endpoints.
distance: Option<i64>Total path weight, or None when the goal is unreachable.
certificate: ShortestPathCertificateThe shortest-path tree certificate produced by Bellman-Ford.
Trait Implementations§
Source§impl<N: Clone> Clone for ShortestPath<N>
impl<N: Clone> Clone for ShortestPath<N>
Source§fn clone(&self) -> ShortestPath<N>
fn clone(&self) -> ShortestPath<N>
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<N: Debug> Debug for ShortestPath<N>
impl<N: Debug> Debug for ShortestPath<N>
impl<N: Eq> Eq for ShortestPath<N>
Source§impl<N: PartialEq> PartialEq for ShortestPath<N>
impl<N: PartialEq> PartialEq for ShortestPath<N>
impl<N: PartialEq> StructuralPartialEq for ShortestPath<N>
Auto Trait Implementations§
impl<N> Freeze for ShortestPath<N>
impl<N> RefUnwindSafe for ShortestPath<N>where
N: RefUnwindSafe,
impl<N> Send for ShortestPath<N>where
N: Send,
impl<N> Sync for ShortestPath<N>where
N: Sync,
impl<N> Unpin for ShortestPath<N>where
N: Unpin,
impl<N> UnsafeUnpin for ShortestPath<N>
impl<N> UnwindSafe for ShortestPath<N>where
N: 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