Smallapack :
a Smalltalk interface
to LAPACK/BLAS
What is LAPACK ?
LAPACK is the LINEAR ALGEBRA PACKAGE distributed at www.netlib.org
It is written in FORTRAN 77 but has ports or interface in C/Java/etc...
LAPACK is a very efficient and robust world-wide-used algebra on
matrices.
See the lapack user guide
for getting informations on what is LAPACK.
Who is Smallapack designed for ?
Smallapack is for Smalltalk developpers and Smalltalk users.
It is usefull for engineering, research, education, design of
mathematical tools, ...
in fact, to every one using matrix algebra.
Which Smalltalk does it run on ?
Smallapack is written for Visualworks 7.2 non commercial available at Cincom.
It should also work on previous 5i versions and probably down to
VW2.5
since DLLCC exists.
Porting Smallapack on Squeak
is under progress (see Smallapack
squeak version).
I also have a first port to Dolphin available (see Smallapack for Dolphin).
No other Smalltalk is targeted yet, but gst and ST/X ports should
not be a problem.
The community should help doing that.
What is the license ?
Smallapack is distributed free with liberal
MIT License.
What is the development status ?
Smallapack is under development. Some features are already implemented
and working:
- various LAPACK Matrices class: real/complex
single/double precision GEneral/HErmitian/SYmmetric/TRiangular
- various creation messages nrow:ncol eye: rows: shape: ones: identity:
etc...
- arithmetic (BLAS) + * - negated reciprocal transpose / \
- concatenation , ,,
- access rowAt:columnAt: diagonalAt: etc...
- luDecomposition, eigenValueDecomposition, singularValueDecomposition,
QR factorization, Schur decomposition, Hessenberg decomposition
I plan to add quickly access to more algebra (least
squares, Cholesky, qz, ...),
methods for solving classical equations (Riccati Lyapounov Sylvester
etc...),
and also extend to other Matrices classes (Band, Packed, Tridiagonal,
etc...).
Where to find code for
Visualworks ?
Smallapack is available primarily at the Cincom
Public Store Repository.
If you do not have and do not wish access to the source repository, you
can also get code:
- for arithmetics extensions including Smallapack here or gzipped,
- and collection extensions (pre-requisite) there
or gzipped.
You will need to compile LAPACK/BLAS as dll,
- here
is my binary linux version
compiled with g77 (not optimized BLAS).
On linux putting them in /usr/local/lib is a good idea since in the
default Smallapack search path.
Optimized BLAS are available commercialy, or free at ATLAS.
What about other implementations of
Matrix and linear algebra in Smalltalk ?
There are plenty. In order to ease integration/interoperation with
other matrices package,
Smallapack has some common protocol with D. Besset Numerical Methods,
with Squeak Matrix,
and also with Jeffrey Hallman's Smallpack
package linked to ancestor of LAPACK : LINPACK.
Smallpack deserve special attention. It is based on same ideas but
implement only real double
precision
Matrix, and do Marshalling between C and Smalltalk in primitive C code.
At this time of writing, Smallpack is much more robust and tested than
Smallapack.
What next ?
My aim is to promote use of Smalltalk for scientific and engineering
applications
I would like to make something equivalent to Matlab available to
Smalltalk
community.
Maybe with a Matlab compatible interpreter...
Next I will work on scientific plots a la Matlab, unless I find a good
existing Smalltalk Package.
If you are interested in more
implementation details:
See the Smallapack
Code Critic
for a discussion of implementation.
See also Smallapack Portability
for discussion of portability across Smalltalk dialects.
Volunteers and testers are welcome.
Visites: