pub struct ShortestPaths {
pub source: usize,
pub distance: Vec<f64>,
pub predecessor: Vec<Option<usize>>,
}Expand description
Distances from a source and the predecessor tree for path reconstruction.
Fields§
§source: usize§distance: Vec<f64>f64::INFINITY for unreachable vertices.
predecessor: Vec<Option<usize>>The previous vertex on a shortest path (None for the source and unreachable vertices).
Implementations§
Trait Implementations§
Source§impl Clone for ShortestPaths
impl Clone for ShortestPaths
Source§impl Debug for ShortestPaths
impl Debug for ShortestPaths
Source§impl PartialEq for ShortestPaths
impl PartialEq for ShortestPaths
impl StructuralPartialEq for ShortestPaths
Auto Trait Implementations§
impl Freeze for ShortestPaths
impl RefUnwindSafe for ShortestPaths
impl Send for ShortestPaths
impl Sync for ShortestPaths
impl Unpin for ShortestPaths
impl UnsafeUnpin for ShortestPaths
impl UnwindSafe for ShortestPaths
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