Skip to content

Matrix implementations

Mike Anderson edited this page Aug 1, 2013 · 10 revisions

Overview

core.matrix supports multiple implemntations of vector/matrix maths conforming to the same API.

Implementations included in core.matrix

  • persistent-vector : regular Clojure vectors work as core.matrix implementations
  • double-array : Java double[] arrays work as 1D mutable vectors
  • ndarray : a general propose mutable n-dimensional array, stores objects of any type
  • sequence : Clojure sequences (anything implementing ISeq) can be used

Main external core.matrix implementations:

  • vectorz-clj : An implementation based on the Vectorz library, which offers fast pure-JVM matrix and vector computation with double-valued matrices. Designed for games, simulations and machine learning. Particularly efficient for small matrix and vector maths.
  • Clatrix : A wrapper of jblas which in uses the BLAS native libraries for matrix computation. Offers high performance for large matrices, at the cost of needing a native code dependency.

Work in progress / experimental implementations

  • Parallel Colt - Support for Parallel Colt matrices
  • Cerebro - inital support for EJML
  • image-matrix - Support for treating a Java BufferedImage as a matrix of pixel colour data.

Example implementations we might want to support in the future:

  • Apache Commons maths
  • javax.vecmath (part of Java3D)
  • UJMP