use syevr meta-algorithm for SymTridiagonal #1493
Open
+64
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement the same meta-algorithm for
SymTridiagonalas whatsyevr(theRobustRepresentationsalgorithm) does internally for its tridiagonal eigensolve. Fixes #1491.This involves two changes to our current algorithm:
eigenoreigvals, ifstegrorstev(respectively) fails it now falls back tostebzandstein.eigenandeigvals, if a subset of the eigenvalues is requested, it now callsstebz(andstein, for eigvecs) instead ofstegr.I'm not so sure about change (2) — it seems to be slightly slower on my machine for a random 1000x1000 matrix. Any idea why
syevrdoes this?In order to implement change (1), I had to make an additional copy of the entries of the
SymTridiagonalmatrix, to preserve them for the fallback routine. I compensated for this by calling the new meta-algorithm directly fromeigenandeigvals. However, it means that if you directly calleigen!oreigvals!onSymTridiagonalit will have an extra allocation. Ultimately, I would like us to allow multiple algorithm choices similar toeigen(::Symmetric).