about Matrix and Array2D

Richard A. O'Keefe ok at cs.otago.ac.nz
Tue Nov 26 01:26:11 UTC 2002


Stephane Ducasse <ducasse at iam.unibe.ch> wrote:
	Array2d for represent a 2d Array and to that regards (contrary
	to what I said) has a good name.  The idea is to have a
	matrix-like way of storing think.
	
I find it rather odd to talk about a '2d array'.
It isn't the *array* that's 2d, but its subscript space,
and that isn't _really_ 2d either.

I wrote my Matrix class to be just a plain Squeaky container.
The reason I wrote it is that when I tried to *use* Array2D the
interface confused the heck out of me, and a whole bunch of things that
Array2D inherits don't actually work.

My Matrix class supports elementwise arithmetic operations, but that's
not "mathematical matrix manipulation", that's just what a *lot* of
Squeak's generic containers do.

The only "mathematical matrix manipulation" I provided is 
{vector,matrix} x {vector,matrix} multiplication, which is too useful
to leave out, and serves the additional purpose of reminding people
that Matrix>>* (copied from SequenceableCollection) is not Matrix>>+*.

A class providing extensive (BLAS, LAPACK, ...) numerical operations
would do well do be a separate class in order to constrain its elements
more tightly.




More information about the Squeak-dev mailing list