pub enum BidirectionalDijkstraOutcome {
Found(f64, bool, Vec<String>),
NoPath,
Contradiction,
NodeMissing,
}Expand description
Outcome of bidirectional_dijkstra_undirected.
Variants§
Found(f64, bool, Vec<String>)
A shortest path was found: (length, all_int_on_path, path-as-node-names).
all_int_on_path is true iff every edge weight summed along the path
is integer-typed (Int/Bool) or absent (defaulting to int 1) — the
condition under which nx returns an int length rather than a float
(Python int + float -> float). Computed here from the inner
AttrMap value variants so the Python wrapper need not re-read the
edge dicts (which would mark the graph attr-dirty and force a resync).
NoPath
No path exists between source and target.
Contradiction
vw_length < dists[dir][w] was observed — nx raises
ValueError("Contradictory paths found: negative weights?").
NodeMissing
source or target is not present in the graph (defensive — the
Python wrapper already raises NodeNotFound before calling).
Auto Trait Implementations§
impl Freeze for BidirectionalDijkstraOutcome
impl RefUnwindSafe for BidirectionalDijkstraOutcome
impl Send for BidirectionalDijkstraOutcome
impl Sync for BidirectionalDijkstraOutcome
impl Unpin for BidirectionalDijkstraOutcome
impl UnsafeUnpin for BidirectionalDijkstraOutcome
impl UnwindSafe for BidirectionalDijkstraOutcome
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more