JuliaLinearAlgebra / ArnoldiMethod.jl

The Arnoldi Method with Krylov-Schur restart, natively in Julia.
https://julialinearalgebra.github.io/ArnoldiMethod.jl/dev
MIT License
96 stars 18 forks source link

Improve QR-algorithm stability #136

Closed haampie closed 7 months ago

haampie commented 7 months ago

Previously a perfect single shift was used in the 2x2 case of real eigenvalues, which can be disastrous for ill-conditioned eigenvalues.

The new implementation considers 2x2 blocks converged whether complex conjugate or real, and upper triangularizes it in case of real eigenvalues in a much more stable way. The most stable rotation is picked (there's a choice in case of two distinct eigenvalues), plus some formula manipulations and scaling tricks are applied.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2076220) 95.21% compared to head (60af40b) 95.47%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #136 +/- ## ========================================== + Coverage 95.21% 95.47% +0.25% ========================================== Files 10 10 Lines 815 839 +24 ========================================== + Hits 776 801 +25 + Misses 39 38 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.