pub enum SparsifierError {
VertexOutOfBounds(usize, usize),
EdgeNotFound(usize, usize),
EdgeAlreadyExists(usize, usize),
InvalidWeight(f64),
InvalidEpsilon(f64),
BudgetTooSmall {
budget: usize,
vertices: usize,
minimum: usize,
},
EmptyGraph,
AuditFailed {
max_error: f64,
threshold: f64,
},
Numerical(String),
Internal(String),
}Expand description
Errors that can occur during sparsification.
Variants§
VertexOutOfBounds(usize, usize)
A vertex index was out of range for the current graph.
EdgeNotFound(usize, usize)
An edge between the given vertices was not found.
EdgeAlreadyExists(usize, usize)
An edge between the given vertices already exists.
InvalidWeight(f64)
An edge weight was non-positive or non-finite.
InvalidEpsilon(f64)
The epsilon parameter was out of the valid range (0, 1).
BudgetTooSmall
The edge budget was too small for the given graph.
Fields
EmptyGraph
The graph has no vertices; sparsification is undefined.
AuditFailed
A spectral audit detected unacceptable distortion.
Numerical(String)
An internal numerical error (e.g. NaN or overflow).
Internal(String)
Catch-all for unexpected internal errors.
Trait Implementations§
Source§impl Debug for SparsifierError
impl Debug for SparsifierError
Source§impl Display for SparsifierError
impl Display for SparsifierError
Source§impl Error for SparsifierError
impl Error for SparsifierError
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()
Auto Trait Implementations§
impl Freeze for SparsifierError
impl RefUnwindSafe for SparsifierError
impl Send for SparsifierError
impl Sync for SparsifierError
impl Unpin for SparsifierError
impl UnsafeUnpin for SparsifierError
impl UnwindSafe for SparsifierError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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