Tuesday, October 5, 2010

Representation for sparse matrices in Clojure

Found 2 nice libraries for representing matrices in Clojure.
First is Incanter, which uses Parallel Colt under the hoods. Cool, very cool library... for dense matrices. The problem is that Incanter supports only one kind of Parallel Colt matrix classes - DenseColDoubleMatrix2D. There are some attempts to add SparseDoubleMatrix2D, but it seems to be not a trivial task.
So we come to another library - Infer. Through it is based on UJMP and looks like very crude version, it has support for (haha!) Parallel Colt sparse matrices. Example of usage can be found at http://measuringmeasures.com/blog/2010/8/26/sparse-matrices-infer-clojure-and-the-jvm.html.