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

Unsupported ARPACK wrapper giving errors

Tags: None
(comma "," separated)
agnosticotter
Registered Member
Posts
2
Karma
0
Hi all,

I'm trying to use the ARPACK wrapper (on the unstable dev branch) with no luck. This is the code I'm trying to compile:

Code: Select all
#include <iostream>
#include <Eigen/Dense>
#include <unsupported/Eigen/ArpackSupport>

using namespace Eigen;
using namespace std;

int main(int argc, const char * argv[])
{
    MatrixXd A = MatrixXd::Random(40, 40);
    ArpackGeneralizedSelfAdjointEigenSolver<MatrixXd> ev(A*A.transpose(), 5);
    return 0;
}

And these are the errors:
Code: Select all
 /usr/local/include/Eigen/src/SparseCholesky/SimplicialCholesky.h:632:77: No member named 'twistedBy' in 'Eigen::SelfAdjointView<const Eigen::Matrix<double, -1, -1, 0, -1, -1>, 1>'

/usr/local/include/Eigen/src/SparseCholesky/SimplicialCholesky.h:258:60: No viable conversion from 'const MatrixType' (aka 'const Eigen::Matrix<double, -1, -1, 0, -1, -1>') to 'MatrixL' (aka 'SparseTriangularView<CholMatrixType, Eigen::Lower>')

/usr/local/include/Eigen/src/SparseCholesky/SimplicialCholesky.h:259:60: No viable conversion from 'const AdjointReturnType' (aka 'const Eigen::Transpose<const Eigen::Matrix<double, -1, -1, 0, -1, -1> >') to 'MatrixU' (aka 'SparseTriangularView<typename CholMatrixType::AdjointReturnType, Eigen::Upper>')

/usr/local/include/Eigen/src/SparseCore/SparseMatrixBase.h:44:23: No matching member function for call to 'evalTo'.

Any ideas?

Thanks!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
it seems this class (ArpackGeneralizedSelfAdjointEigenSolver) is for sparse matrices only.
dharmon
Registered Member
Posts
6
Karma
0
Unfortunately, I had to make some assumptions about the type of matrix solver used (the second
template parameter) for the SPD case (at least for it to be super fast).

There was no way to get the permuted version of the matrix L in a decomposition, so I have
to manually apply the permutation. This means any solver without a permutation will not work.

It definitely would be possible to add some sort of flag and then implement a partial template
specialization for a non-permuted LLT solver, but I didn't worry about it too much because Eigen
already has a good dense eigensolver.
agnosticotter
Registered Member
Posts
2
Karma
0
Thanks for your replies!

I kinda "solved" the problem using sparseView(). I don't know if this workaround is a good way to do it but it's working fine. In my setting, all matrices are dense and I typically need a small number of eigenvalues/vectors (e.g., PCA).


Bookmarks



Who is online

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