Re: Re: Matrix column access

Cyrus Harmon <[email protected]> Tue, 6 Dec 2005 13:57:32 -0800
Newsgroups gmane.lisp.matlisp.user
Message-ID <[email protected]>
Nicolas and Ray,

I hope this isn't to off-topic, but I thought I'd jump in to the  
middle of this conversation and point out my matrix library, clem.  
It's available at http://cyrusharmon.org/cl/static/releases/ 
clem-0.1.5-20051204.tar.gz .

It's not the greatest, but it does have CLOS support for a standard- 
matrix-class and facilities for designing "typed" matrices and fast  
generic functions for those matrices. Currently it supports the  
obvious types, number, real, complex, float, double-float, single- 
float, ub{8,16,32}, sb{8,16,32}, and bit. On SBCL at least, much of  
the matrix arithmetic doesn't cons. The operations supported are  
rather limited, but it does do affine transformation, discrete  
convolution, multiplication, etc...

It takes a while to compile and there's probably better ways to make  
this stuff go faster (define-compiler-macro maybe? more inline  
functions?) but it's better than nothing and is handy for me as I  
need big bit matrices and using a double-float for matlisp is kind of  
a waste here.

I've also done a little bit of work to go back and forth to matlisp.  
I was rather disappointed that the state of matrix math packages on  
common-lisp was that I had to write my own. I would gladly abandon  
this project for an alternative, but I haven't found that yet. In the  
meantime, feedback on it is greatly appreciated.

Thanks,

Cyrus

On Dec 6, 2005, at 1:34 PM, Raymond Toy wrote:

>>>>>> "Nicolas" == Nicolas Neuss <[email protected] 
>>>>>> heidelberg.de> writes:
>
>     Nicolas> This makes it possible to have also matrices of single- 
> floats, etc.
>
> Oh, matlisp consciously supports only double-floats, but single-floats
> would be possible.  Some kind of macro like you have would help.
>
>     Nicolas> 2. One should automate Matlisp's BLAS interface.   
> Something like (get-blas
>     Nicolas> 'daxpy) should make the Fortran daxpy routine available.
>>>
>>> I don't follow what you mean by this.  They're always available in
>>> Matlisp.
>
>     Nicolas> But not every routine as much as I remember.  And for
>     Nicolas> complete generality, also the single-float versions
>     Nicolas> should be available.  I think that it should be possible
>     Nicolas> to automate the process of making such a routine
>     Nicolas> available.
>
> I think all the BLAS routines are there.  (Well, maybe not the level-3
> blas routines).
>
> Not quite sure what you mean by automating the process of making the
> routines available.  Someone has to figure out the function signature
> to tell Lisp how to call it.  And some of the functions take
> characters or strings, and that is very dependent on the Fortran
> compiler.  Same with returning complex values.
>
> I did toy around with the idea of letting f2cl grovel over the
> functions and extracting the interfaces, but I didn't get very far
> with that.
>
>     Nicolas> interface.  What I don't like is the duplication of code
>     Nicolas> for the different matrix classes.
>
> Yes, that's not good.  It's been cleaned up some, but I think there's
> still quite a bit of duplication.
>
> Ray
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through  
> log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD  
> SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Matlisp-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matlisp-users



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click