Skip to content

Matrix implementations

Matt Adereth edited this page Oct 14, 2013 · 8 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

Example implementations we might want to support in the future:

  • javax.vecmath (part of Java3D)
  • UJMP
Clone this wiki locally