8

我需要计算(稀疏)矩阵的最大特征值。我实现了幂次迭代的方法,但是收敛速度太慢,所以我想用一个包来实现它。有人有推荐吗?

什么是最好的 C++ 特征值计算包?最好是小型且易于编译的。

4

2 回答 2

3

我无法为您提供任何细节,因为我自己没有使用过它,但我认为 ARPACK 可能会有所帮助,尤其是 ARPACK++,它是 C++ 改编版,因为原始包位于 Fortran77 中。我认为 MATLAB 函数 eigs() 使用它来找到最大的特征值(和相应的特征向量)。据我所知,t 也应该能够与 STL 交互。

MATLAB 使用 Fortran77 例程 DSAUPD、DSEUPD、DNAUPD、DNEUPD、ZNAUPD 和 ZNEUPD。他们似乎是在 ARPACK++ 中寻找的那些。

在这里查看。

于 2010-07-02T11:04:22.543 回答
0

At least if memory serves, one possibility would be Boost::uBlas. While Boost as a whole is pretty big, uBlas by itself is quite a bit more reasonable. Moreover, if memory serves it's a header-only library, so using it is pretty easy (you don't have to build the library first, set anything up for the linker, etc.)

Edit: I should add that computing Eigenvalues/vectors in general is pretty slow, even with fairly optimized code. Depending on exactly what you're doing, it's often worthwhile to look into methods that (for one example) let you get by with computing the Eigenvalue of only a subset of the matrix (e.g., Landmark Multidimensional Scaling).

于 2010-06-26T21:42:06.707 回答