From: Stu Glaser
Subject: Eigenvalues and SVD
Date: 
Message-ID: <du3ckj$f78$1@newsreader.wustl.edu>
Hi all (or at least everyone who wasn't scared off by "eigenvalues"),

I'd like to perform matrix operations in Lisp, including finding the 
eigenvalues/eigenvectors and (hopefully) producing the singlular value 
decomposition.

I've found two packages that might suit my needs.

First: CLEM (CL Egregious Matrix library)
It seems very new.  So new that documentation doesn't seem to exist. 
Does it support finding eigenvalues yet?

Second: matlisp

This looks perfect.  Except I shrink in fear at the thought of dealing 
with fortran (blas and lapack).

Does anyone use this regularly (or recently)?
For those who have:
1. Does it work on SBCL (It only says CMUCL and Allegro, but I'm curious)
2. How difficult is installing BLAS and LAPACK?  Do you have any 
suggestions before I commit my eyes, body, and soul to the documentation?

Thanks for any help!
-Stu Glaser

From: rif
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <wj064my4a8h.fsf@five-percent-nation.mit.edu>
If you're serious about doing linear algebra, BLAS/LAPACK is really
the only decent choice.  matlisp is currently the only CL package I'm
aware of that wraps them, although it's my hope to make and release a
thinner wrapper around them "sometime soon".

BLAS/LAPACK itself is fairly easy to install, and very easy if you're
using a linux package management system.  You want to make sure to
install ATLAS, which are essentially high-performance versions of the
library for your system.  On debian at least, you probably want to
install both the regular and the -dev versions of the packages (the
-dev give you header files and create "unversioned" .so files which
are easiest to link to).

matlisp is, in my opinion, a bit finicky in it's build system.  It
might just work on sbcl, but it might be a pain; I've only used it on
cmucl before.

rif
From: AJ Rossini
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <1141234902.154098.321330@e56g2000cwe.googlegroups.com>
I've got some patches that should make it work with SBCL.  They update
some of the work by Robbie Sedgewick.  I've been meaning to get them
back to the maintainers, but, but (excuse 1, excuse 2, excuse 3...).

Anyway, I can provide a working tarball before that, based on
matlisp.cvs, working with SBCL 0.9.9.

best,
-tony
From: Jim Bushnell
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <PamdnZp2Nb8rQ5jZnZ2dnUVZ_vydnZ2d@comcast.com>
"Stu Glaser" <·········@gmail.com> wrote in message 
·················@newsreader.wustl.edu...
> Hi all (or at least everyone who wasn't scared off by "eigenvalues"),
>
> I'd like to perform matrix operations in Lisp, including finding the 
> eigenvalues/eigenvectors and (hopefully) producing the singlular value 
> decomposition.
>
> I've found two packages that might suit my needs.
>
> First: CLEM (CL Egregious Matrix library)
> It seems very new.  So new that documentation doesn't seem to exist. Does 
> it support finding eigenvalues yet?
>
> Second: matlisp
>
> This looks perfect.  Except I shrink in fear at the thought of dealing 
> with fortran (blas and lapack).
>
> Does anyone use this regularly (or recently)?
> For those who have:
> 1. Does it work on SBCL (It only says CMUCL and Allegro, but I'm curious)
> 2. How difficult is installing BLAS and LAPACK?  Do you have any 
> suggestions before I commit my eyes, body, and soul to the documentation?
>
> Thanks for any help!
> -Stu Glaser

I have a Common Lisp SVD implementation I translated from the C version in 
"Numerical Methods in C" which I would be happy to post or email. It works 
in Lispworks Professional 4.4.6 and earlier versions, and I think it is 
correct, but it comes with NO guarantees.

I think it should work with most versions of Common Lisp, as there is no 
code specific to Lispworks in it. I have done little in the way of 
optimizing it with declarations, etc.

Jim Bushnell 
From: ··············@hotmail.com
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <1141245482.558760.7220@j33g2000cwa.googlegroups.com>
Jim Bushnell wrote:
> "Stu Glaser" <·········@gmail.com> wrote in message
> ·················@newsreader.wustl.edu...
> > Hi all (or at least everyone who wasn't scared off by "eigenvalues"),
> >
> > I'd like to perform matrix operations in Lisp, including finding the
> > eigenvalues/eigenvectors and (hopefully) producing the singlular value
> > decomposition.

>
> I have a Common Lisp SVD implementation I translated from the C version in
> "Numerical Methods in C" which I would be happy to post or email. It works
> in Lispworks Professional 4.4.6 and earlier versions, and I think it is
> correct, but it comes with NO guarantees.

I am not an expert in the field of matrix computation, but Numerical
Recipes in general has a relatively poor reputation among numerical
experts. LAPACK is used by the experts, and has a good reputation.

Matrix computations are notorious for often having poor behavior for
problems that arise in practice, and require expert treatment to be
accurate and robust, not to mention efficient.
From: Alexander Schmolck
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <yfshd6igewp.fsf@oc.ex.ac.uk>
"Jim Bushnell" <···········@comcast.net> writes:

> I have a Common Lisp SVD implementation I translated from the C version in 
> "Numerical Methods in C" which I would be happy to post or email. It works 
> in Lispworks Professional 4.4.6 and earlier versions, and I think it is 
> correct, but it comes with NO guarantees.

I wouldn't mind having a look, but are you sure the original license allows
this? (IANAL but if you just translated it the original copyright should still
apply and e.g. the code in Numerical Recipies comes with a decidedly
non-free license)

'as
From: Jim Bushnell
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <xa-dnV9PVri6h5fZRVn-pw@comcast.com>
"Alexander Schmolck" <··········@gmail.com> wrote in message 
····················@oc.ex.ac.uk...
> "Jim Bushnell" <···········@comcast.net> writes:
>
>> I have a Common Lisp SVD implementation I translated from the C version 
>> in
>> "Numerical Methods in C" which I would be happy to post or email. It 
>> works
>> in Lispworks Professional 4.4.6 and earlier versions, and I think it is
>> correct, but it comes with NO guarantees.
>
> I wouldn't mind having a look, but are you sure the original license 
> allows
> this? (IANAL but if you just translated it the original copyright should 
> still
> apply and e.g. the code in Numerical Recipies comes with a decidedly
> non-free license)
>
> 'as

I had forgotten this license requirement, so I guess my translation can only 
be for my use. Thanks for the reminder.

Jim Bushnell 
From: john whittaker
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <1141239937.192022.264340@v46g2000cwv.googlegroups.com>
FWIW,

There is a cl-octave package available, and I would think Octave would
support SVD (but I don't know).  I have also been attempting to create
a shared library version of Scilab, which just released version 4.0.
Scilab is a great tool, very much like MATLAB, only free.  The binary
version for Windows seems to already have a .dll which you can link
with using UFFI or CFFI or the like.  I have NOT been able to build
Scilab on Linux such that it has shared libraries and is thereby
loadable as a foreign library.

John Whittaker

Stu Glaser wrote:
> Hi all (or at least everyone who wasn't scared off by "eigenvalues"),
>
> I'd like to perform matrix operations in Lisp, including finding the
> eigenvalues/eigenvectors and (hopefully) producing the singlular value
> decomposition.
>
> I've found two packages that might suit my needs.
>
> First: CLEM (CL Egregious Matrix library)
> It seems very new.  So new that documentation doesn't seem to exist.
> Does it support finding eigenvalues yet?
>
> Second: matlisp
>
> This looks perfect.  Except I shrink in fear at the thought of dealing
> with fortran (blas and lapack).
>
> Does anyone use this regularly (or recently)?
> For those who have:
> 1. Does it work on SBCL (It only says CMUCL and Allegro, but I'm curious)
> 2. How difficult is installing BLAS and LAPACK?  Do you have any
> suggestions before I commit my eyes, body, and soul to the documentation?
> 
> Thanks for any help!
> -Stu Glaser
From: Stu Glaser
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <du8g7a$1dg$1@newsreader.wustl.edu>
Thanks everyone for the help, info, and advice.

I toyed with the cvs version of matlisp using gentoo's blas package.  It 
seems to work fine under SBCL (at least for svd and eigenvalues).  I 
expect it will suit my purposes fine.

Thanks again,
-Stu
From: Roland Kaufmann
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <tl2acc7bv22.fsf@localhost.localdomain>
>>>>> "john" == john whittaker <··············@honeywell.com> writes:

    john> FWIW,

    john> There is a cl-octave package available, and I would think
    john> Octave would support SVD (but I don't know).

Yes it does (based on LAPACK).

    john> I have also been attempting to create a shared library
    john> version of Scilab, which just released version 4.0.  Scilab
    john> is a great tool, very much like MATLAB, only free.

So is octave (actually, it has better compatibility to Matlab).

                                regards
                                    Roland
From: Marco Baringer
Subject: Re: Eigenvalues and SVD
Date: 
Message-ID: <m2r75mv4pj.fsf@bese.it>
Stu Glaser <·········@gmail.com> writes:

> This looks perfect.  Except I shrink in fear at the thought of dealing
> with fortran (blas and lapack).

i haven't used it recently but, a year or two ago, i was able to use
it for some heavy-duty svd work.

> Does anyone use this regularly (or recently)?
> For those who have:
> 1. Does it work on SBCL (It only says CMUCL and Allegro, but I'm curious)

i only used cumcl.

> 2. How difficult is installing BLAS and LAPACK?  Do you have any
> suggestions before I commit my eyes, body, and soul to the

i downloaded pre-built binaries (debian has a lapack 3.0 package) and
didn't have any trouble at all.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen