pub enum SheafError {
DimensionMismatch {
edge: (usize, usize),
expected_rows: usize,
expected_cols: usize,
got_rows: usize,
got_cols: usize,
},
InvalidNode(usize),
InvalidEdge(usize, usize),
BeliefDimensionMismatch {
agent: String,
expected: usize,
got: usize,
},
EmptySheaf,
SingularMatrix,
}Expand description
Errors that can arise when building or using cellular sheaves.
Variants§
DimensionMismatch
A restriction map dimension does not match its target stalk.
Fields
InvalidNode(usize)
A node index is out of range.
InvalidEdge(usize, usize)
An edge references an unknown node.
BeliefDimensionMismatch
Belief vector length does not match stalk dimension.
EmptySheaf
Empty sheaf (no nodes).
SingularMatrix
Linear algebra failure.
Trait Implementations§
Source§impl Debug for SheafError
impl Debug for SheafError
Source§impl Display for SheafError
impl Display for SheafError
Source§impl Error for SheafError
impl Error for SheafError
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 SheafError
impl RefUnwindSafe for SheafError
impl Send for SheafError
impl Sync for SheafError
impl Unpin for SheafError
impl UnsafeUnpin for SheafError
impl UnwindSafe for SheafError
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