rajats
Registered Member

Hi
I am using the EigenSolver Class for computing the Eigenvectors and Eigenvalues (Specifically the dominant Eigenvector (Eigenvalue) ) for a given matrix. My specific questions in this context are as follows : 1>>>>> Having browsed through the documentation of the EigenSolver class (http://eigen.tuxfamily.org/dox/classEig ... olver.html), I have reached the conclusion that the Eigenvalues (and Eigenvectors) returned by the EigenSolver::compute function are not sorted in any particular order. Is this correct? 2>>>> If the answer to the previous question is yes, given the fact that most real world applications of Eigendecomposition are generally concerned with using the dominant Eigenvector (Eigenvalue) for further computation, is it not a bit strange that the output from the EigenSolver::compute is not sorted. cheers 
jitseniesen
Registered Member

1. Correct. 2. One problem is depending on the situation (basically, continuous versus discrete time), the dominant eigenvalue can be the one with the largest magnitude or the largest real part. Another problem is the sort order is not specified completely. Yet another problem is that we do not want to harm the performance of those users who do not want to sort eigenvalues are in the minority (though that may not be very convincing). However, perhaps we should make it easier to get the dominant eigenvalue/vector. 
rajats
Registered Member

I believe that the "Power iteration" can be used to compute the dominant eigenvector (eigenvalue) for a given matrix. Is there an implementation of this method in Eigen?

ggael
Moderator

indeed, to compute only the dominants eigenvalues/vectors, you need totally different algorithms than the ones implemented in *EigenSolver. For the inspiration a naive power iteration algorithm:

linello
Registered Member

This can be an implementation of power iteration method in Eigen, maybe ggael can help about possible optimizations

Registered users: AElfwine, Baidu [Spider], bcooksley, Bing [Bot], Exabot [Bot], fbouchard, Google [Bot], joaob, Jucato, Majestic12 [Bot], MSNbot Media, pouar, vvakk, Yahoo [Bot]