pub struct DijkstraAlgorithm {
pub graph: HashMap<usize, Vec<(usize, usize)>>,
}
Expand description
Dijkstra’s Algorithm. Find the shortest path from a starting node to all other nodes in a weighted graph.
Fields§
§graph: HashMap<usize, Vec<(usize, usize)>>
Graph to search.
Implementations§
Trait Implementations§
Source§impl Clone for DijkstraAlgorithm
impl Clone for DijkstraAlgorithm
Source§fn clone(&self) -> DijkstraAlgorithm
fn clone(&self) -> DijkstraAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DijkstraAlgorithm
impl Debug for DijkstraAlgorithm
Source§impl Default for DijkstraAlgorithm
impl Default for DijkstraAlgorithm
Source§impl GraphAlgorithm for DijkstraAlgorithm
impl GraphAlgorithm for DijkstraAlgorithm
Auto Trait Implementations§
impl Freeze for DijkstraAlgorithm
impl RefUnwindSafe for DijkstraAlgorithm
impl Send for DijkstraAlgorithm
impl Sync for DijkstraAlgorithm
impl Unpin for DijkstraAlgorithm
impl UnwindSafe for DijkstraAlgorithm
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