pub enum AlgebraError {
ShapeMismatch(String),
Ragged,
NoStar,
LimitExceeded(String),
DimensionOverflow {
rows: usize,
cols: usize,
},
InvalidMatrix {
rows: usize,
cols: usize,
expected: usize,
actual: usize,
},
IndexOutOfBounds {
index: usize,
len: usize,
},
}Expand description
Errors raised by semiring construction and matrix operations.
Variants§
ShapeMismatch(String)
Operand shapes are incompatible for the requested operation.
Ragged
A from_rows input had rows of unequal length.
NoStar
Closure is undefined: a diagonal entry’s Kleene star does not converge
(either the semiring defines no star, or the series diverges here, as
with a negative cycle in min-plus or a directed cycle in counting).
LimitExceeded(String)
An explicit size or iteration limit was exceeded.
DimensionOverflow
A matrix dimension product overflowed usize.
InvalidMatrix
A public matrix value violated data.len() == rows * cols.
Fields
IndexOutOfBounds
An index was out of bounds.
Trait Implementations§
Source§impl Clone for AlgebraError
impl Clone for AlgebraError
Source§fn clone(&self) -> AlgebraError
fn clone(&self) -> AlgebraError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AlgebraError
impl Debug for AlgebraError
Source§impl Display for AlgebraError
impl Display for AlgebraError
impl Eq for AlgebraError
Source§impl Error for AlgebraError
impl Error for AlgebraError
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 PartialEq for AlgebraError
impl PartialEq for AlgebraError
impl StructuralPartialEq for AlgebraError
Auto Trait Implementations§
impl Freeze for AlgebraError
impl RefUnwindSafe for AlgebraError
impl Send for AlgebraError
impl Sync for AlgebraError
impl Unpin for AlgebraError
impl UnsafeUnpin for AlgebraError
impl UnwindSafe for AlgebraError
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