use thiserror::Error;
#[derive(Debug, Error)]
pub enum StochasticError {
#[error("frame dim mismatch: expected {expected}, got {got}")]
FrameDimMismatch {
expected: usize,
got: usize,
},
#[error("noise dim mismatch: frame has {frame_dim} vectors, got dW of length {noise_dim}")]
NoiseDimMismatch {
frame_dim: usize,
noise_dim: usize,
},
#[error("gram-schmidt failure at index {index}: residual norm {norm} below {threshold}")]
GramSchmidtRankDeficient {
index: usize,
norm: f64,
threshold: f64,
},
#[error("cartan-core error: {0}")]
Cartan(#[from] cartan_core::CartanError),
}