pub enum MaxFlowError {
SourceEqualsSink(usize),
VertexNotFound(usize),
MaxIterationsReached(usize),
EmptyGraph,
InternalError(String),
}Expand description
Errors that can occur during max-flow computations.
Variants§
SourceEqualsSink(usize)
The source and sink vertices are the same.
VertexNotFound(usize)
A specified vertex was not found in the graph (e.g., index out of bounds).
MaxIterationsReached(usize)
The algorithm reached its maximum allowed iterations before completion. This might indicate a very complex graph or an iteration limit that is too low.
EmptyGraph
The graph has no vertices, making max-flow undefined.
InternalError(String)
An unspecified internal error occurred within the max-flow algorithm.
Trait Implementations§
Source§impl Clone for MaxFlowError
impl Clone for MaxFlowError
Source§fn clone(&self) -> MaxFlowError
fn clone(&self) -> MaxFlowError
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 moreSource§impl Debug for MaxFlowError
impl Debug for MaxFlowError
Source§impl Display for MaxFlowError
impl Display for MaxFlowError
Source§impl Error for MaxFlowError
impl Error for MaxFlowError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<MaxFlowError> for GomoryHuError
impl From<MaxFlowError> for GomoryHuError
Source§fn from(source: MaxFlowError) -> Self
fn from(source: MaxFlowError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MaxFlowError
impl RefUnwindSafe for MaxFlowError
impl Send for MaxFlowError
impl Sync for MaxFlowError
impl Unpin for MaxFlowError
impl UnwindSafe for MaxFlowError
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