Closed YaqiWang closed 8 years ago
This can probably be done, but note that DenseMatrix::evd()
is implemented in terms of DGEEVX
, which we assume is available through SLEPc (to avoid worrying about different ways of wrapping the Fortran function call) so you will need to have SLEPc available in order to use it...
A patch for this change would be welcome! It should be pretty straightforward to provide a second implementation of evd that returns the eigenvectors.
After looking at it in a bit more detail, it looks like we can get what we need from dgeev, which is available via PETSc, rather than relying on the more complicated/sophisticated dgeevx as is done now... so the first part of the fix for this Issue should be using the simpler interface, and the second part would be making the eigenvectors available. @YaqiWang do you need left eigenvalues or right eigenvalues or both?
In our case the matrix is symmetric, so left and right are the same. But in general we need both. Another thing: do we always have such a decomposition like svd?
Another thing: do we always have such a decomposition like svd?
The eigen-decomposition A = VDV^{-1} exists if the eigen-vectors are linearly independent (hence V^{-1} makes sense), but this is not guaranteed for general matrices... It should be guaranteed for symmetric positive semi-definite matrices though, which is why SVD is guaranteed...
Implemented in #1063.
We'd like to get eigenvalues of a small dense matrix instead of singular values, which are non-negative. Current interface does not return the eigenvectors which we also want. It will be great we can have similar interface like
svd
forevd
. Thanks!