What is a good representation for matrices in Clojure? I'm interested in dealing with dense matrices of floating point numbers. The "list of lists" representation springs to mind, but is there something better?
Some criteria for a good representation include:
map
with pmap
, that would be nice.reduce
: It seems like lots of the calculations I'm doing work very well with reduce
.Any thoughts?
Incanter supplies a wrapper around some of Parallel Colt, including what looks to be a pretty decent implementation of fast, parallelized dense matrices that interface with Clojure's seq-based libraries. I haven't used it, but it should be what you're looking for.
Example.
I'm writing a matrix library wrapping jblas called, tentatively, Clatrix. It's missing a lot of features I still want to add, but it's got most of what you might be looking for. Take a look, http://github.com/tel/clatrix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With