pub enum ArpackError {
Show 26 variants
NoError,
Prod,
NPos,
NevNPos,
NcvSmall,
NonPosI,
WhichInv,
BmatInv,
WorklSmall,
TriDErr,
ZeroStart,
ModeInv,
ModeBmat,
IShift,
NevBe,
NoFact,
Failed,
Howmny,
HowmnyS,
EvDiff,
Shur,
Lapack,
Unknown,
MaxIt,
NoShift,
Reorder,
}Expand description
Error conditions reported by ARPACK (igraph_arpack_error_t), see
ArpackError::from_error and arpack_error_to_string.
Variants§
NoError
No error.
Prod
Matrix-vector product failed (not used any more).
NPos
N must be positive.
NevNPos
NEV must be positive.
NcvSmall
NCV must be bigger.
NonPosI
Maximum number of iterations should be positive.
WhichInv
Invalid WHICH parameter.
BmatInv
Invalid BMAT parameter.
WorklSmall
WORKL is too small.
TriDErr
LAPACK error in tridiagonal eigenvalue calculation.
ZeroStart
Starting vector is zero.
ModeInv
MODE is invalid.
ModeBmat
MODE and BMAT are not compatible.
IShift
ISHIFT must be 0 or 1.
NevBe
NEV and WHICH=‘BE’ are incompatible.
NoFact
Could not build an Arnoldi factorization.
Failed
No eigenvalues to sufficient accuracy.
Howmny
HOWMNY is invalid.
HowmnyS
HOWMNY=‘S’ is not implemented.
EvDiff
Different number of converged Ritz values.
Shur
Error from calculation of a real Schur form.
Lapack
LAPACK (dtrevc) error for calculating eigenvectors.
Unknown
Unknown ARPACK error.
MaxIt
Maximum number of iterations reached.
NoShift
No shifts could be applied during a cycle of the implicitly restarted Arnoldi iteration.
Reorder
The Schur form could not be reordered.
Implementations§
Source§impl ArpackError
impl ArpackError
Sourcepub fn from_error(error: &Error) -> Option<Self>
pub fn from_error(error: &Error) -> Option<Self>
The ARPACK error condition behind an
ErrorKind::Arpack error, recognized from
its message (igraph reports ARPACK failures with the text of
arpack_error_to_string); None for other errors.
Unlike arpack_last_error this is thread-safe: it only looks at the
error value returned by the failed call.
use igraph::{linalg::*, ErrorKind};
// The Laplacian of a path, started from its eigenvector (1, ..., 1) of
// eigenvalue 0: ARPACK's first Krylov vector is zero.
let n = 6;
let path = move |x: &[f64], y: &mut [f64]| {
for i in 0..n {
let deg = if i == 0 || i == n - 1 { 1.0 } else { 2.0 };
y[i] = deg * x[i];
if i > 0 {
y[i] -= x[i - 1];
}
if i + 1 < n {
y[i] -= x[i + 1];
}
}
};
let opts = ArpackOptions::default()
.with_start(vec![1.0; n])
.with_which(ArpackWhich::SmallestMagnitude);
let err = arpack_rssolve(n, path, &opts, None).unwrap_err();
assert_eq!(err.kind(), ErrorKind::Arpack);
assert_eq!(ArpackError::from_error(&err), Some(ArpackError::ZeroStart));Trait Implementations§
Source§impl Clone for ArpackError
impl Clone for ArpackError
Source§fn clone(&self) -> ArpackError
fn clone(&self) -> ArpackError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ArpackError
Source§impl Debug for ArpackError
impl Debug for ArpackError
Source§impl Display for ArpackError
impl Display for ArpackError
impl Eq for ArpackError
Source§impl From<ArpackError> for igraph_arpack_error_t
impl From<ArpackError> for igraph_arpack_error_t
Source§fn from(value: ArpackError) -> igraph_arpack_error_t
fn from(value: ArpackError) -> igraph_arpack_error_t
Source§impl Hash for ArpackError
impl Hash for ArpackError
Source§impl PartialEq for ArpackError
impl PartialEq for ArpackError
Source§fn eq(&self, other: &ArpackError) -> bool
fn eq(&self, other: &ArpackError) -> bool
self and other values to be equal, and is used by ==.