#[non_exhaustive]pub enum ImplicitError {
Singular,
DimensionMismatch {
field: &'static str,
expected: usize,
actual: usize,
},
}Expand description
Reason a dense implicit-differentiation call failed.
Marked #[non_exhaustive] so future variants can be added without
breaking exhaustive matches.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Singular
F_z could not be used for a reliable solve. Fires in three
situations, currently collapsed under one name because the dense
LU does not expose which branch tripped:
- Structural singularity —
linalg::lu_factorencountered an exactly-zero pivot (e.g. a rank-deficientF_z). - Numeric singularity — a pivot below
ε·n·‖F_z‖∞(the relative threshold anchored on the matrix infinity norm). - Non-finite input or intermediate — a NaN or ±Inf reached
the LU pivot (rejected up-front by
lu_factorto prevent silent NaN-tainted factors), or, forimplicit_hvp/implicit_hessian, the nested-dual forward pass produced non-finite higher-order coefficients that would poison the back-solve output.
#[non_exhaustive] leaves room to split these cases (or to
align with a future unified naming axis across dense and sparse
implicit modules) without a breaking change.
DimensionMismatch
A runtime-supplied vector argument to a public implicit_*
fn had an unexpected length. field names the argument
(e.g. "x_dot", "z_bar", "v", "w"), expected is the
length the API requires (typically num_states or x.len()),
actual is the length the caller supplied.
Tape-shape contract mismatches (checked in validate_inputs)
continue to panic — those are programmer-contract violations,
not recoverable runtime failures.
Trait Implementations§
Source§impl Clone for ImplicitError
impl Clone for ImplicitError
Source§fn clone(&self) -> ImplicitError
fn clone(&self) -> ImplicitError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImplicitError
impl Debug for ImplicitError
Source§impl Display for ImplicitError
impl Display for ImplicitError
Source§impl Error for ImplicitError
impl Error for ImplicitError
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()
Auto Trait Implementations§
impl Freeze for ImplicitError
impl RefUnwindSafe for ImplicitError
impl Send for ImplicitError
impl Sync for ImplicitError
impl Unpin for ImplicitError
impl UnsafeUnpin for ImplicitError
impl UnwindSafe for ImplicitError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.