#[non_exhaustive]pub enum Which {
LargestMagnitude,
SmallestMagnitude,
LargestAlgebraic,
SmallestAlgebraic,
BothEnds,
LargestReal,
SmallestReal,
LargestImag,
SmallestImag,
}Expand description
Which part of the spectrum, with ARPACK’s two-letter codes
(Which::from_arpack) so that R and Python pass their strings
through xingo-ffi unchanged. eigsh() accepts LM SM LA SA BE;
eigs() accepts LM SM LR SR LI SI; any other combination is
StatlaError::InvalidArgument.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LargestMagnitude
LM: largest |λ| (default of ARPACK, scipy, RSpectra).
SmallestMagnitude
SM: smallest |λ| (slow without shift-invert: prefer
crate::eigsh_near with σ = 0).
LargestAlgebraic
LA: largest algebraic (symmetric).
SmallestAlgebraic
SA: smallest algebraic (symmetric).
BothEnds
BE: half from each end, the extra one from the high end, as
ARPACK (symmetric).
LargestReal
LR: largest real part (general).
SmallestReal
SR: smallest real part (general).
LargestImag
LI: largest imaginary part in magnitude (general).
SmallestImag
SI: smallest imaginary part in magnitude (general).
Implementations§
Source§impl Which
impl Which
Sourcepub fn from_arpack(code: &str) -> Option<Self>
pub fn from_arpack(code: &str) -> Option<Self>
The value of an ARPACK code ("LM", …), case-sensitive as ARPACK.
Sourcepub fn arpack_code(self) -> &'static str
pub fn arpack_code(self) -> &'static str
The ARPACK code.