#[non_exhaustive]pub enum LanczosError {
NonFinite {
iters: usize,
eigenvalue: f64,
residual: f64,
},
}Expand description
Errors from the native Lanczos solver.
This carries only genuine runtime failures the caller can recover
from. Caller-side invariant violations (dim == 0, max_iter == 0,
a non-finite or negative tol) and operator-contract violations (an
LinearOp::apply returning a tensor of shape other than [dim])
remain panics — they are programmer errors, not recoverable
conditions. Failing to reach the requested tol is likewise not an
error: it is reported as LanczosResult::converged being false
so the caller keeps the best Ritz pair.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NonFinite
The computed eigenpair is not finite (NaN/Inf), typically
because the operator emitted a non-finite vector or the 2-norm
overflowed (see the overflow note on lanczos_smallest). A
non-finite result must not flow on as a normal LanczosResult,
where it would silently poison every downstream computation. The
diagnostics are carried as f64 so the error type stays
non-generic.
Trait Implementations§
Source§impl Debug for LanczosError
impl Debug for LanczosError
Source§impl Display for LanczosError
impl Display for LanczosError
Source§impl Error for LanczosError
impl Error for LanczosError
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()
Source§impl From<LanczosError> for DmrgHeffError
impl From<LanczosError> for DmrgHeffError
Source§fn from(source: LanczosError) -> Self
fn from(source: LanczosError) -> Self
Auto Trait Implementations§
impl Freeze for LanczosError
impl RefUnwindSafe for LanczosError
impl Send for LanczosError
impl Sync for LanczosError
impl Unpin for LanczosError
impl UnsafeUnpin for LanczosError
impl UnwindSafe for LanczosError
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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