pub struct DijkstraResult<NodeId, EdgeWeight> {
pub distances: Vec<EdgeWeight>,
pub predecessors: Vec<Option<NodeId>>,
}Expand description
Result of Dijkstra’s shortest path algorithm.
Contains the distances from the source node to all other nodes, and the predecessor of each node along the shortest path.
Fields§
§distances: Vec<EdgeWeight>§predecessors: Vec<Option<NodeId>>Trait Implementations§
Source§impl<NodeId: Clone, EdgeWeight: Clone> Clone for DijkstraResult<NodeId, EdgeWeight>
impl<NodeId: Clone, EdgeWeight: Clone> Clone for DijkstraResult<NodeId, EdgeWeight>
Source§fn clone(&self) -> DijkstraResult<NodeId, EdgeWeight>
fn clone(&self) -> DijkstraResult<NodeId, EdgeWeight>
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 moreAuto Trait Implementations§
impl<NodeId, EdgeWeight> Freeze for DijkstraResult<NodeId, EdgeWeight>
impl<NodeId, EdgeWeight> RefUnwindSafe for DijkstraResult<NodeId, EdgeWeight>where
EdgeWeight: RefUnwindSafe,
NodeId: RefUnwindSafe,
impl<NodeId, EdgeWeight> Send for DijkstraResult<NodeId, EdgeWeight>
impl<NodeId, EdgeWeight> Sync for DijkstraResult<NodeId, EdgeWeight>
impl<NodeId, EdgeWeight> Unpin for DijkstraResult<NodeId, EdgeWeight>
impl<NodeId, EdgeWeight> UnsafeUnpin for DijkstraResult<NodeId, EdgeWeight>
impl<NodeId, EdgeWeight> UnwindSafe for DijkstraResult<NodeId, EdgeWeight>where
EdgeWeight: UnwindSafe,
NodeId: 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