[−][src]Struct competitive_hpp::dijkstra::Dijkstra
Dijkstra
Example:
use competitive_hpp::prelude::*; // edge: Vec<(from, to, cost)> let edges = vec![(0, 1, 1),(0, 2, 6),(1, 3, 2)]; //Dijkstra::new(vertex num, edges, start vertex) let dijkstra = Dijkstra::new(4, &edges, 0); assert_eq!(dijkstra.dist[0], 0); assert_eq!(dijkstra.dist[1], 1); assert_eq!(dijkstra.dist[2], 6);
Fields
dist: Vec<F>
adjacency_list: Vec<Vec<(usize, F)>>
Implementations
impl<T, F> Dijkstra<T, F> where
T: PrimInt,
F: Num + Bounded + Clone + Copy + PartialOrd,
[src]
T: PrimInt,
F: Num + Bounded + Clone + Copy + PartialOrd,
Trait Implementations
impl<T: Clone, F: Clone> Clone for Dijkstra<T, F> where
T: PrimInt,
F: Num + Bounded + Clone + Copy + PartialOrd,
[src]
T: PrimInt,
F: Num + Bounded + Clone + Copy + PartialOrd,
impl<T: Debug, F: Debug> Debug for Dijkstra<T, F> where
T: PrimInt,
F: Num + Bounded + Clone + Copy + PartialOrd,
[src]
T: PrimInt,
F: Num + Bounded + Clone + Copy + PartialOrd,
Auto Trait Implementations
impl<T, F> RefUnwindSafe for Dijkstra<T, F> where
F: RefUnwindSafe,
T: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for Dijkstra<T, F> where
F: Send,
T: Send,
F: Send,
T: Send,
impl<T, F> Sync for Dijkstra<T, F> where
F: Sync,
T: Sync,
F: Sync,
T: Sync,
impl<T, F> Unpin for Dijkstra<T, F> where
F: Unpin,
T: Unpin,
F: Unpin,
T: Unpin,
impl<T, F> UnwindSafe for Dijkstra<T, F> where
F: UnwindSafe,
T: UnwindSafe,
F: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,