What is MatLisp? MatLisp is a set of CLOS classes for handling matrices. The classes allow a simple and consistent interface to matrix operations. Matlisp is powered by the well-known and well-tested linear algebra packages BLAS and LAPACK. This provides the Matlisp user an immediate interface to a set of specialized and well documented linear algebra routines such as +, -, *, /, eigenvalue, SVD and Cholesky decompositions and the list continues ... Why MatLisp? While MatLisp essentially supplies a wrapper around the BLAS and LAPACK routines, it is more than that. You have at your disposable the complete Lisp language and CLOS. This allows you to write clean, object-oriented code that can utilize the LAPACK matrix routines. Thus, you can think about your problem in the natural way instead of trying to force-fit your problem in matrices, like some other packages do. What About Matlab, Rlab, Octave, etc? While all of these are good at what they do, they all have a fundamental limitation: Everything is a matrix. You have no alternative. Either you make your problem fit into a matrix, or you can't use these languages. MatLisp frees you from this limitation -- you have at your disposal, the complete functionality of Common Lisp, including structures, hash tables, lists, arrays, and the Common Lisp Object System (CLOS). MatLisp adds to this richness by giving you a matrix fast class based on BLAS and LAPACK. Thus, you can think about your problem in the most natural way, without having to force everything into a matrix. In the natural way, you can then use a matrix, and achieve high performance. Will Matlisp work on my system? Either CMUCL (version 18b or later) or Allegro CL (version 5.0 or later) or SBCL (version ?) is required.



Allegro CL: Matlisp should compile on Linux, Solaris, Windows. In particular, Matlisp relies on the foreign function interface of Allegro CL.



CMU CL: Matlisp should compile on Linux, Solaris. In particular, Matlisp relies on the foreign function interface of CMU CL and the built-in type kernel::complex-double-float.



How easy is it to install Matlisp? Linux/Unix Installation: One of the design goals of Matlisp was to ensure the consistency of installation. Matlisp is currently distributed as source code and the user must do a compilation. A great deal of effort was put into a configure script that determines machine parameters, system libraries and without bothering the user. The installation follows in a few easy steps: Click here to download the Matlisp sources, or get the sources from version control. Unpack the source file gunzip matlisp-x.x.tgz tar -vxf matlisp-x.x.tar Change to that directory cd matlisp-x.x Create a build directory. (You can use any name you like.) mkdir build Configure the system First run autoreconf --install to create all the necessary configuration files. Then you can run configure to configure the software: cd build ../configure --enable-<lisp> --with-lisp-exec=<exec> --libdir=$PWD/lib --enable-static-no Build the system make That's all there is to it. In order for this to work, configure must be able to detect a Fortran compiler and a C compiler in your path. This is usually the case. If configure fails you should contact your system administrator. For higher performance you may consider using optimized BLAS/LAPACK libraries that may be available for your system. For example, the file lib/lazy-loader.lisp contains sample code that would use the ATLAS replacement library for BLAS. MS Windows installation: 1. Click here to download the Matlisp sources.

2. Unpack the source file

3. From within Allegro CL: (load "start.lisp") That should be all. The precompiled BLAS/LAPACK libraries were obtained from http://www.che.chalmers.se/~agris/Programming/clapack/clapack.html Unfortunately, we currently do not support the functions FFT, IFFT which rely of DFFTPACK for MS Windows. How do I get started with Matlisp? The main source of information for Matlisp is the built-in help system. Type (help) at the Lisp prompt to learn more about help. We provide here an austere list of Matlisp functions:

axpy

axpy!

copy

copy!

ctranspose

diag

dot

eig

eye

fill-matrix

geev

gemm

gemm!

gesv

gesv!

getrf!

help

imag

join

join-matrix lu

m*

m*!

m+

m+!

m-

m.*

m.*!

m.+

m.+!

m.-

m./

m./!

m/

m/!

macos

macosh

make-complex-matrix

make-real-matrix

map-matrix map-matrix!

masin

masinh

matan

matanh

matrix-ref

matrix-ref-1

mcos

mcosh

mexp

mlog

mlog10

msin

msinh

msqrt

mtan

mtanh

norm

ones

rand reshape

reshape!

scal

scal!

seq

size

sum

svd

swap!

transpose

vec

zeros

fft

ifft