pub enum MatrixError {
MatrixCreationError,
MatrixIndexOutOfBoundsError,
MatrixMultiplicationDimensionMismatchError,
MatrixDimensionMismatchError,
MatrixConcatinationError,
MatrixParseError,
MatrixDivideByZeroError,
MatrixFileReadError(&'static str),
}
Expand description
Common Matrix errors that can occur
Variants§
MatrixCreationError
Upon creation of a matrix, this could occur
MatrixIndexOutOfBoundsError
Index out of bound error
MatrixMultiplicationDimensionMismatchError
This can only happen on matmul, where if the 2 matrices are not in the form of (M x N) @ (N x P) then this error will occur.
MatrixDimensionMismatchError
Occurs on matrix operations where there is a dimension mismatch between the two matrices.
MatrixConcatinationError
Concatination Error
MatrixParseError
If reading matrix from file and an error occurs, this will be thrown
MatrixDivideByZeroError
Divide by zero
MatrixFileReadError(&'static str)
File read error
Trait Implementations§
Source§impl Debug for MatrixError
impl Debug for MatrixError
Source§impl Display for MatrixError
impl Display for MatrixError
Source§impl PartialEq for MatrixError
impl PartialEq for MatrixError
impl StructuralPartialEq for MatrixError
Auto Trait Implementations§
impl Freeze for MatrixError
impl RefUnwindSafe for MatrixError
impl Send for MatrixError
impl Sync for MatrixError
impl Unpin for MatrixError
impl UnwindSafe for MatrixError
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> 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