This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Matrix smobs in guile


>>>>> "J" == Jim Blandy <jimb@red-bean.com> writes:

    J> Uniform arrays are the closest thing Guile has to real matrix
    J> support.  If they're clumsy to work with from C, then we should
    J> improve the interface.  I don't do much numeric programming, so
    J> I'm at the mercy of the numeric folks on the list to submit
    J> improvements.

I wrote some fairly high-powered numerical stuff intended to work with
Guile.  I basically wrapped the BLAS/Lapack/FFTPACK libraries from
netlib in a nice C interface, and then exported the C wrapper to Guile
as a set of Guile modules.  The C wrapper is CHRLIB (but needs a
better name) and the Guile wrapper is G-CHRLIB (again for want of a
better name).  I put these on a web page at
<http://www.cs.cmu.edu/~chrislee/chrlib> and I think some people
looked at it but I don't know if anyone else uses the code.  It
currently has some support for neural networks, hidden markov models,
homogeneous coordinates, and reading binary data files.

The C part is documented, but the Scheme side needs some work and
documentation.  I can answer questions (but will be gone next week :).
It has run under Linux, Irix, and Solaris (and possibly a Cray?) to my
knowledge.

The trick to using it is getting BLAS/Lapack/FFTPACK on your system so
that you can use it (but I enclose some info about this).  I intend to
package everything for Debian GNU/Linux some time this summer to make
it easier for Debian people to try it out.

CHRLIB is not closely coupled to Guile data structures.  It uses its
own so that porting code from Guile G-CHRLIB applications to pure C
applications is simple, and so that porting to other Scheme
interpreters is possible.  For this reason, it uses G-Wrap for
exporting functions and data types.  For this reason also, it may not
be the "right" solution for people wanting to work closely with Guile
internals while doing numerical stuff (I am not sure why you would
really want to do this, but there must be valid reasons).  It also
doesn't grok complex numbers yet :(.

Also look for information about the GNU Scientific Library (??).  They
are doing some similar stuff independently.

 -Chris