Registered Member
|
Hi,
I was wondering if you have any function to calculate only a small amount of eigenvalues and eigenvectors of a matrix using "Implicitly Restarted Arnoldi Methods". It is much faster if we want only the small subset of the eigenvalues. This function is already in ARPACK. I was wondering if it is in Eigen? and if not, how can I incorporate it (if it is easy) ? Thanks |
Registered Member
|
Hi-
I would find this functionality useful as well, but I don't believe it is currently in eigen. In my code I only need the first value: #include <iostream> #include <Eigen/Core> #include <Eigen/Array> #include <Eigen/SVD> using namespace Eigen; G = A.transpose()*A; SVD<MatrixXd> svdOfG(G); double tau = svdOfG.singularValues()(0); I can't answer your question about how hard it would be to add. |
Registered Member
|
Eigen doesn't do this at the moment, and it's actually quite nontrivial to add, as it is a completely separate algorithm.
However, if you're starting from a general (not banded/hessenberg) matrix, then the benefit of not computing all the eigenvalues, is not too big, as most of the time is typically spend in first reducing to banded/hessenberg form.
Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list! |
Registered Member
|
OK. But --while I'm consider myself in the best case as semi-educated in this kind of discussion-- please let me add: Starting from a FE-Analysis one typically have to deal with large sparse, often symmetrical, matrices. There exists also often a need to determine the very first eigenvalue. In this scenario, computing all eigenvalues is preventable slow by using specialized (e.g. iterative) methods. (see e.g. http://www.cs.utk.edu/~dongarra/etemplates/index.html) Frank |
Registered Member
|
I managed to compile arpack and then used arpack++ wrapper for its eigenvalue computations. It has very good performance. I haven't linked it with Eigen yet, but basically, you can add this functionality by using arpack, and for matrix-vector multiplication in the algorithms you can either use blas or use Eigen.
So I think it's an easy add-on functionality to Eigen. Best |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]