pub struct FloydWarshallResult { /* private fields */ }Expand description
Result of Floyd-Warshall algorithm.
Implementations§
Source§impl FloydWarshallResult
impl FloydWarshallResult
Sourcepub fn distance(&self, from: NodeId, to: NodeId) -> Option<f64>
pub fn distance(&self, from: NodeId, to: NodeId) -> Option<f64>
Returns the shortest distance between two nodes.
Sourcepub fn path(&self, from: NodeId, to: NodeId) -> Option<Vec<NodeId>>
pub fn path(&self, from: NodeId, to: NodeId) -> Option<Vec<NodeId>>
Reconstructs the shortest path between two nodes.
Sourcepub fn has_negative_cycle(&self) -> bool
pub fn has_negative_cycle(&self) -> bool
Checks if the graph has a negative cycle.
Trait Implementations§
Source§impl Clone for FloydWarshallResult
impl Clone for FloydWarshallResult
Source§fn clone(&self) -> FloydWarshallResult
fn clone(&self) -> FloydWarshallResult
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 moreAuto Trait Implementations§
impl Freeze for FloydWarshallResult
impl RefUnwindSafe for FloydWarshallResult
impl Send for FloydWarshallResult
impl Sync for FloydWarshallResult
impl Unpin for FloydWarshallResult
impl UnwindSafe for FloydWarshallResult
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