lynxoid
lynxoid

Reputation: 519

Java eigensolvers

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 packages compute all eigenvectors.

Upvotes: 6

Views: 865

Answers (3)

nichole
nichole

Reputation: 131

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

Upvotes: 0

SplittingField
SplittingField

Reputation: 741

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.

Upvotes: 2

moritz
moritz

Reputation: 5224

I don't know if this can help you, but this math library isn't on your list.

Apache Commons Math

Upvotes: 0

Related Questions