Registered Member
|
Hi all,
I'm new to Eigen library, and I feel really love it. But now, I have a problem. I use EigenSolver to compute the eigenvalues and eigenvectors of a matrix, and I use function real() to avoid the complex numbers. My idea is that I want to sort the eigenvalues in order, and of course when the eigenvalues are sorted, so did the corresponding eigenvectors. I found there are some topics in this forum about this question, but they are considered about 1 or 2 years from now. I'm wondering if Eigen library has developed some good function to do this job? Really appreciate your help. And here's my code now.
|
Moderator
|
Given its name, I guess that "covMat" is symmetric, then use SelfAdjointEigenSolver that will be faster with eigenvalues/vectors naturally sorted from the smallest to the largest.
|
Registered Member
|
Thanks a lot, I get the exactly what I want, this library is really cool. |
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar