pub enum MatrixCIError {
DimensionMismatch {
expected_rows: usize,
expected_cols: usize,
actual_rows: usize,
actual_cols: usize,
},
IndexOutOfBounds {
row: usize,
col: usize,
nrows: usize,
ncols: usize,
},
DuplicatePivotRow {
row: usize,
},
DuplicatePivotCol {
col: usize,
},
FullRank,
EmptyIndexSet {
dimension: String,
},
InvalidArgument {
message: String,
},
SingularMatrix,
RankDeficient,
NaNEncountered {
matrix: String,
},
}Expand description
Errors that can occur during matrix cross interpolation operations
§Examples
use tensor4all_tcicore::MatrixCIError;
let err = MatrixCIError::DimensionMismatch {
expected_rows: 3,
expected_cols: 3,
actual_rows: 2,
actual_cols: 2,
};
assert!(format!("{err}").contains("Dimension mismatch"));
let err = MatrixCIError::FullRank;
assert!(format!("{err}").contains("full rank"));
// Matching on error variants
match err {
MatrixCIError::FullRank => assert!(true),
_ => panic!("unexpected variant"),
}Variants§
DimensionMismatch
Dimension mismatch between matrix and MatrixCI object
Fields
IndexOutOfBounds
Index out of bounds
Fields
DuplicatePivotRow
Duplicate pivot row
DuplicatePivotCol
Duplicate pivot column
FullRank
Matrix is already full rank
EmptyIndexSet
Empty row or column set
InvalidArgument
Invalid argument
SingularMatrix
Singular matrix encountered
RankDeficient
Rank deficient matrix
NaNEncountered
NaN values encountered
Trait Implementations§
Source§impl Debug for MatrixCIError
impl Debug for MatrixCIError
Source§impl Display for MatrixCIError
impl Display for MatrixCIError
Source§impl Error for MatrixCIError
impl Error for MatrixCIError
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 MatrixCIError
impl RefUnwindSafe for MatrixCIError
impl Send for MatrixCIError
impl Sync for MatrixCIError
impl Unpin for MatrixCIError
impl UnsafeUnpin for MatrixCIError
impl UnwindSafe for MatrixCIError
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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