Expand description
Safe Rust wrapper around ARPACK-NG.
Provides safe drivers for the supported eigenproblem variants
(real-symmetric Lanczos and complex Arnoldi). Callers that need
to drive ARPACK manually should depend on arpack-sys directly.
Each driver family exposes two layers:
eigenpairs_*— general entry point that acceptsnev >= 1and aWhichselector. Returns aMultiEigSolution.smallest_eigenpair_*— convenience wrapper fixed tonev = 1and the family’s “smallest” mode (Which::SmallestAlgebraicfor the real-symmetric driver,Which::SmallestRealPartfor the complex Arnoldi driver). Returns a singularEigSolution.
§Example
Smallest eigenvalue of diag(1, 2, 3):
use arpack::{Options, smallest_eigenpair_f64};
let diag = [1.0_f64, 2.0, 3.0];
let n = diag.len();
let solution = smallest_eigenpair_f64(
n,
|x, y| {
for i in 0..n {
y[i] = diag[i] * x[i];
}
},
&Options::default(),
)
.expect("ARPACK converged");
assert!((solution.eigenvalue - 1.0).abs() < 1e-9);Re-exports§
pub use error::Error;pub use symmetric::Options;pub use symmetric::eigenpairs_f32;pub use symmetric::eigenpairs_f64;pub use symmetric::smallest_eigenpair_f32;pub use symmetric::smallest_eigenpair_f64;
Modules§
- arnoldi
- Arnoldi-iteration eigenvalue drivers (
*naupd_c/*neupd_c). - error
- symmetric
- Real-symmetric eigenvalue drivers backed by the ARPACK-NG
{s,d}{sa,se}upd_cfamily (Implicitly Restarted Lanczos).
Structs§
- EigSolution
- The eigenpair returned by a driver, plus the diagnostic counters
ARPACK writes back into
iparamduring the iteration. - Multi
EigSolution - Multi-eigenpair result returned by the
eigenpairs_*drivers.
Enums§
- Which
- Ritz value selector passed to ARPACK’s
*aupd_cwhichparameter.