Does anyone know of an eigensolver in Java that can give me just several smallest eigenvectors w/o computing the whole eigendecomposition (namely, second smallest EV)? I have looked at Colt, Jama, MTJ, UJMP, but these p开发者_开发百科ackages compute all eigenvectors.
Can you describe your matrix in more detail? Is it sparse? In general, sparse linear algebra packages have methods to compute only a few of the smallest or largest eigenpairs. For example, you can try to use ARPACK from within Java.
Another idea is just to write your own version of the Power Method, which is good at finding a few extreme eigenvalues very quickly. For example, see Eigenvalue Template Book (Hermitian) if your matrix is Hermitian or Eigenvalue Template Book (non-Hermitian) if your matrix is non-Hermitian.
I don't know if this can help you, but this math library isn't on your list.
Apache Commons Math
MTJ includes the netlib-java and has a wrapper to use arpack, so one can solve for a set number of eigenvalues and there are choices on the attributes of those.
See https://github.com/fommil/matrix-toolkits-java/blob/master/src/test/java/no/uib/cipr/matrix/sparse/ArpackSymTest.java
and http://static.javadoc.io/com.googlecode.matrix-toolkits-java/mtj/1.0.4/no/uib/cipr/matrix/sparse/ArpackSym.html
精彩评论