c++ - Eigenvalues of sparse matrix using Eigen3 -
is there distinct , effective way of finding eigenvalues , eigenvectors of real, symmetrical, large, let's 10000x10000, sparse matrix in eigen3? there eigenvalue solver dense matrices doesn't make use of properties of matrix e.g. it's symmetry. furthermore don't want store matrix in dense.
or there better (+better documented) library that?
assuming you're looking c++ library, check armadillo.
the eigs_sym()
function seems want. quoting docs, it:
obtains limited number of eigenvalues , eigenvectors of sparse symmetric real matrix x
a minimal example docs adapted desired matrix size:
// generate sparse matrix sp_mat = sprandu<sp_mat>(10000, 10000, 0.1); sp_mat b = a.t()*a; vec eigval; mat eigvec; eigs_sym(eigval, eigvec, b, 5); // find 5 eigenvalues/eigenvectors
Comments
Post a Comment