0
votes

I am looking for a linear algebra library in Java which can handle large "sparse" matrices of size (say 1 million by 1 million) and perform decompositions like SVD,LU on the matrices.

I looked around and tried COLT, however it can only handle matrices upto a fixed number of elements.

EJML site also mentions that it won't be able to handle this. (http://code.google.com/p/efficient-java-matrix-library/wiki/FAQ)

I know that there are packages out there in C++ which can handle data of this size, however, I can not move from Java as I have all other code built around Java.

Any thoughts? Any help is greatly appreciated!

1

1 Answers

0
votes

Try to look at la4j (Linear Algebra for Java). It handles sparse matrices as well as dense ones. So you can try something like this:

Matrix a = new CRSMatrix(...); // Compressed Row Storage format
Matrix vd[] = a.decompose(Matrices.EIGEN_DECOMPOSITOR); // vd[0] = V, vd[1] = D

So, it works fine with sparse matrices, but I'm not sure about (1 million X 1 million) size.