Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong eigenvector sorting in nalgebra::SymmetricEigen, while correct in nalgebra_lapack::SymmetricEigen #1344

Open
yesint opened this issue Jan 1, 2024 · 1 comment

Comments

@yesint
Copy link

yesint commented Jan 1, 2024

It seems that nalgebra::SymmetricEigen doesn't sort eigenvectors properly in the ascending order of eigenvalues, while nalgebra_lapack::SymmetricEigen does this correctly.

This example code produces different order of eigenvalues in nalgebra and nalgebra_lapack:

nalgebra: two first values are not in correct ascending order!

val =
 
  ┌            ┐
  │ -39261.336 │
  │ -58575.883 │
  │  -17988.87 │
  │  17988.875 │
  │   39261.33 │
  │  58575.883 │
  └            ┘

nalgebra_lapack: correct sorting

val =
 
  ┌            ┐
  │   -58575.8 │
  │ -39261.313 │
  │ -17988.877 │
  │  17988.863 │
  │  39261.305 │
  │   58575.83 │
  └            ┘
@yesint
Copy link
Author

yesint commented Mar 30, 2024

Bump! Is this inconsistent behavior considered normal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant