6

I need to perform numerical analysis like that supported by MatLab or NumPy. Is there a good library that is supported by Scheme/Lisp/Clojure(Java)? I don't want to leave my round braces.

Thanks a lot.

Svante
  • 50,694
  • 11
  • 78
  • 122
unj2
  • 52,135
  • 87
  • 247
  • 375

5 Answers5

7

For Common Lisp, see

  • Matlisp: a matrix package for Common Lisp (includes BLAS and LAPACK);
  • GSLL: GNU Scientific Library for Lisp;

and others on cliki.

huaiyuan
  • 26,129
  • 5
  • 57
  • 63
6

Incanter is a Clojure-based, R-like statistical computing and graphics environment for the JVM. At the core of Incanter are the Parallel Colt numerics library, a multithreaded version of Colt, and the JFreeChart charting library, as well as several other Java and Clojure libraries.

http://incanter.org/

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
  • WOW this looks interesting. Are there any benchmarks available? – unj2 Jul 18 '09 at 01:27
  • +1 for Incanter - been using it for a few weeks with absolutely no issues. Haven't really pushed performance but it seems good. – mikera Feb 22 '11 at 13:01
  • 2
    Incanter is using Parallel Colt, which in several benchmarks has shown to be ~10x slower than LAPACK. If anyone has *first-hand experience* with a matrix library for a Lisp using LAPACK/BLAS that has been tested heavily (MATLAB/NumPy/R), please let me know. I have been looking and haven't found it. – gappy Dec 02 '11 at 13:46
  • Clatrix is a Clojure wrapper of BLAS: worth looking at. It's also a `core.matrix` implementation, which is important as it brings a general purpose N-dimensional array API to Clojure. – mikera Apr 15 '13 at 04:32
5

Lisp:

http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/math/matrix/0.html

Java:

Jama:http://math.nist.gov/javanumerics/jama/
Colt:http://acs.lbl.gov/~hoschek/colt/
Apache commons math: http://commons.apache.org/math/

If speed is important, you can try Parallel Colt: http://sites.google.com/site/piotrwendykier/software/parallelcolt

Community
  • 1
  • 1
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
3

For PLT Scheme see the plt-linalg package on planet. There is also mzgsl which has bindings for the GNU Scientific Library.

Eli Barzilay
  • 29,301
  • 3
  • 67
  • 110
3

core.matrix is now under development which will bring comprehensive N-dimensional array features (NumPy style) to Clojure: https://github.com/mikera/matrix-api

An important point about core.matrix is that it supports multiple different back-end matrix implementations through the same API.

For example, there is already a pretty good / fast pure Java core.matrix implementation called vectorz-clj, and another one called Clatrix that uses the native JBLAS libraries.

Disclaimer: I'm a major contributor to both core.matrix and vectorz-clj.:

mikera
  • 105,238
  • 25
  • 256
  • 415