[GOODIE] Matrix-raok

Richard A. O'Keefe ok at cs.otago.ac.nz
Fri Nov 22 04:52:27 UTC 2002


I'm sorry that was posted twice.  'mail to list' works differently in
the Squeak I sent that from; the balloon help for 'send' said "add to
queue of messages to send" or something like that, but sent it straight
away.  I looked in the .tosend and .sent categories in Celeste (in fact,
in all the categories) but saw no sign of it, so thought it hadn't gone out.

The numerical linear algebra package recently posted to this list has
*far* wider coverage.  My little 'Matrix' class is now of interest 
mainly (solely?) for these two reasons:

(1) I deliberately decided NOT to let you specify a class by the underlying
    array.  Code complexity was one reason, but my big excuse was the fact
    that "unboxed" arrays like FloatArray are significantly *SLOWER* to use
    than plain old Array.  Yes, you save space.  Yes, you have something
    that's easier to share with C.  But you lose quite a lot of time using
    them from ordinary Smalltalk, and Jitter will, if anything, make that
    worse.

(2) A very major point was my decision, influenced by APL and S-Plus,
    that ordinary arithmetic binary selectors should *consistently* be
    interpreted as elementwise operations.  That is,
    / 1 2 \  * / 1 0 \  = / 
    \ 3 4 /    \ 0 1 /
    This obliged me to invent an operator for matrix multiplication.




More information about the Squeak-dev mailing list