blr_core/error.rs
1use thiserror::Error;
2
3/// Errors that can arise during BLR+ARD operations.
4#[derive(Debug, Error)]
5pub enum BLRError {
6 /// A matrix required to be positive-definite is singular.
7 #[error("matrix is singular or not positive-definite")]
8 SingularMatrix,
9
10 /// Dimension mismatch in an input or intermediate calculation.
11 #[error("dimension mismatch: expected {expected}, got {got}")]
12 DimMismatch { expected: usize, got: usize },
13}