MatLisp: a matrix package for Common Lisp
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 ...
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.
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. You will also need a C and Fortran compiler along with asdf2. (If you do not have asdf2, you can easily obtain a copy with Quicklisp, which is very useful on its own.)
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.
Quick installation is done in a few easy steps below. (See DetailedInstallation for more information.)
- Click here to download the MatLisp sources, or get the sources from version control.
- Unpack the source file
tar -vxf matlisp-x.x.tar
- Change to that directory
- Create a build directory. (You can use any name you like.)
- Configure the system
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
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.
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.
Starting Points for Trac
- TracGuide -- Built-in Documentation
- The Trac project -- Trac Open Source Project
- Trac FAQ -- Frequently Asked Questions
- TracSupport -- Trac Support
For a complete list of local wiki pages, see TitleIndex.