Matrix multiplier class needed

I have posted this request about a week ago. Thanks to those who have

already sent an answer!

Since I need even more programs, I am posting this one more time:

Currently, I am working on a thesis about the impact of

programing style on performance (at the University of Technology,

Vienna, Austria, Europe). For that purpose, I need a somewhat larger

sample of functionally equivalent programs (ie classes and methods).

If you have already written something like a matrix class, or if you

don`t mind writing some code (~100 Lines) just for fun (and maybe also

for your own use), please read the following specification and send a mail

In advance: Thank you!

Note & Guarantee: Your program will not be used for any other purpose than

the publication mentioned above.

The Specification:

------------------

A program is required which reads two square matrices of integer numbers

from an input file and writes their product to an output file. (Both

files are in text format) The size of the matrices is *NOT* known in advance.

(Skip this if you know how to multiply matrices:)

For two matrices A and B, the elements cij of their product C are

calculated as follows (For matrix A, aij denotes the element in the

i-th row and the j-th column of A):

n

cij = Sum aik*bkj

k=1

("n" stands for the size of the matrices, and "Sum" can be replaced by

the Greek capital letter "Sigma".)

Input and output:

-----------------

There should be a possibility to specify the names of the input and

output files with the topmost method.

The input looks like this:

<n> <a11> <a12> ... <a1n> <a21> .. <ann> <b11> ... <bnn>

All Elements are integers. To keep scanning simple, they are

separated either by a single Character tab or Character cr.

<n> is the size (number of rows and columns) of the

subsequent matrices

<a??> are the (signed) elements of A (listed row-wise)

<b??> are the (signed) elements of B (listed row-wise)

The resulting matrix C is written to the specified output file in the

following manner:

<c11> <c12> .. <c1n>

<c21> ...

..

<cn1> .. <cnn>

Elements of the same row are separated by a signle blank (or tab), and

rows are separated by a newline character.

Restrictions:

-------------

*) Please follow the specification of input and output file formats

as accurately as possible.

*) You may develop for (nearly) any Smalltalk-dialect, but plese avoid

everything too {*filter*}.

Thank you very much for your interest and your effort. Please send an

email containing the code. I`ll post the results as soon to this forum

as I've got any.

Gerfried

------------------------------------------------------------------

Schindlerg. 3A phone/fax: **43-1-478-17-09 (home)

A-1180 Vienna

Austria, Europe

-------------------------------------------------------------------