pub enum SubstrateError {
SingularMatrix {
size: usize,
det: f64,
},
StabilizationFailed {
size: usize,
ridge: f64,
},
DimensionMismatch {
expected: usize,
actual: usize,
},
}Expand description
Recoverable math failures surface through this enum instead of panic!.
The substrate’s runtime layers (orchestrator, ensemble, daemon, reconciler) treat every variant as a soft signal — either by retrying with regularised inputs or by gracefully degrading to a no-op so a degenerate telemetry sample never kills the daemon process.
Lives in shivya-hodge (Layer 0) because both the discrete-exterior-calculus
operators and the higher-layer matrix inverter need a shared error vocabulary;
shivya-flux re-exports it so existing call sites keep working.
Variants§
SingularMatrix
Covariance / precision matrix was singular at the listed size.
det is the determinant at the point of failure.
StabilizationFailed
Even after a ridge of ridge the matrix remained ill-conditioned;
the math path fell back to the identity (= maximum-entropy prior).
DimensionMismatch
Combining vectors/matrices with mismatched extents.
Trait Implementations§
Source§impl Clone for SubstrateError
impl Clone for SubstrateError
Source§fn clone(&self) -> SubstrateError
fn clone(&self) -> SubstrateError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubstrateError
impl Debug for SubstrateError
Source§impl Display for SubstrateError
impl Display for SubstrateError
Source§impl Error for SubstrateError
impl Error for SubstrateError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()