This forum has been archived. All content is frozen. Please use KDE Discuss instead.

About sorting eigenvalues

Tags: None
(comma "," separated)
lyh03259
Registered Member
Posts
5
Karma
0

About sorting eigenvalues

Wed Nov 02, 2011 10:20 pm
Hello everyone,

I just moved from fortran90 with lapack to C++ with Eigen. I know that writing a universal sort function for eigenvalue problem is not possible. But when the matrix is symmetry/Hermitian, the eigenvalues are real numbers. And such kind of matrices are heavily used in physics. So I am wondering whether there is a easy way to sort the real eigenvalues as well as eigenvectors?

Please tell me if the answer is yes. If the answer is no, I am hoping Eigen developers can add such a sort function in the later versions or sort the real eigenvalues automatically. And I am sure that the LAPACK(fortran) Hermitian matrix eigen solver sort the result automatically, and GSL provide a function for sorting Hermitian matrix eigenvalues.

Eigen is one of the most beautiful scientific code that I've ever seen so far :) Many thanks to the developers.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: About sorting eigenvalues

Thu Nov 03, 2011 7:59 am
Hi,

this is already the case, EigenSelfAdjointSolver automatically sorts the eigenvalues in increasing order.

gael
lyh03259
Registered Member
Posts
5
Karma
0

Re: About sorting eigenvalues

Fri Nov 04, 2011 12:31 am
Sorry I didn't see it! Thanks for the help.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]