pub struct BellmanFordResult {
pub distances: FxHashMap<NodeId, f64>,
pub predecessors: FxHashMap<NodeId, NodeId>,
pub has_negative_cycle: bool,
/* private fields */
}Expand description
Result of Bellman-Ford algorithm.
Fields§
§distances: FxHashMap<NodeId, f64>Distances from source to each reachable node.
predecessors: FxHashMap<NodeId, NodeId>Predecessor map for path reconstruction.
has_negative_cycle: boolWhether a negative cycle was detected.
Implementations§
Trait Implementations§
Source§impl Clone for BellmanFordResult
impl Clone for BellmanFordResult
Source§fn clone(&self) -> BellmanFordResult
fn clone(&self) -> BellmanFordResult
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 BellmanFordResult
impl RefUnwindSafe for BellmanFordResult
impl Send for BellmanFordResult
impl Sync for BellmanFordResult
impl Unpin for BellmanFordResult
impl UnwindSafe for BellmanFordResult
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