Expand description
LAS2, from SVDLIBC. Deprecated and numerically unreliable — enable las2 only to
keep a 1.x caller compiling while it moves to irlba.
Single-vector Lanczos with selective reorthogonalization — a port of LAS2 from
Doug Rohde’s SVDLIBC.
§⚠ This module is deprecated and numerically unreliable
LAS2 as implemented here does not agree with a dense LAPACK reference on any
matrix class tested. The largest singular value comes back with 18%–100% relative
error, including on diag(n, n-1, ..., 1) at full requested rank. The defect is
inherited from published 1.x, not introduced by the sprs port — running
single-svdlib 1.0.9 on identical fixtures reproduces the same wrong values.
Two causes are known:
- Fixed.
imtqlbhoisted its shift origin out of the iteration loop, so every eigenvalue after the first used a stale shift. EISPACKIMTQL1assignsp = d(l)inside the loop. This is what produced the “imtqlb had some convergence issues” warnings 1.x printed on nearly every input before continuing with corrupted Ritz values. - Open.
ritvecreadss[k*js + i]— rowk— whileimtql2stores eigenvectors as columns. Transposing roughly halves the residual error but does not eliminate it, so at least one further defect remains.
Use crate::irlba instead: restarted Lanczos bidiagonalization, validated against
LAPACK, with a Krylov basis bounded by the requested rank rather than growing to
min(rows, cols).
The module is retained so 2.0 does not silently drop the API, and so the repair has
a home. The accuracy tests are present but #[ignore]d, and
report_accuracy_vs_lapack prints the current error profile.
Constants§
- DEFAULT_
END_ INTERVAL - Default end interval: eigenvalues inside it are considered unwanted.
- DEFAULT_
KAPPA - Default relative accuracy for accepting a Ritz value as an eigenvalue.
Functions§
- svd
Deprecated - SVD at full dimensionality with default tolerances.
- svd_dim
Deprecated - SVD at the requested dimensionality with default tolerances.
- svd_
dim_ seed Deprecated - SVD at the requested dimensionality with a fixed seed.
- svd_
las2 Deprecated - Compute a singular value decomposition with full control.