Why I think lapack matrices should not be converted to list-of-lists.



On 1/3/07, Richard Fateman <fateman at cs.berkeley.edu> wrote:

> It is not at all that hard -- and in fact is done in Mathematica, I believe
> -- to support another type of matrix (or more...). Namely large numerical
> matrices are stored in Mathematica NOT at lists of lists. This makes it
> possible to mimic  programs like matlab at full speed (in fact, as fast as
> matlab or faster).

A distinct dense general purpose matrix type (i.e. comparable to the
existing matrix type) would be a disaster. Maxima is enough of
a mess as it stands. Much better would be to rework the existing
matrix type, so that from the user's point of view there is still only
one general purpose dense matrix type.

I made an incomplete prototype of a matrix reimplementation a while
ago. Finishing it be tedious (finding all the (EQ (CAAR EXPR) '$MATRIX)
mostly) but well within our capability. See:
http://www.math.utexas.edu/pipermail/maxima/2006/001181.html
and other messages in the same thread.

> A full commitment to numerical matrix computation would provide the full
> complement of representation possibilities, including triangular,
> tridiagonal, symmetric, sparse, ...  double, complex

Well, a full commitment would be nice, but even a partial
commitment would be an improvement.

> (a) a new maxima "head" or "operator"  which would be (say) ddmatrix for
> dense matrix of real double floats, e.g.  ((ddmatrix 10 20 simp) <a lisp
> matrix compatible with C>)

No, another general-purpose dense matrix type would only add to the
confusion. I'm not opposed to special-purpose types (e.g. sparse).

> (b) display programs for this. Naturally it would be unusual to see ALL of a
> large matrix in a 2-D display, since the typical entry would itself take 16+
> character spaces.

OK.

> (c) setting and accessing functions ... i.e.  a[p,q] as a value and a[p,q]:
> ...

If we invent new matrix types, they should act like the existing ones
w.r.t. getting and setting values. Not sure if you mean something else here.

> (d) conversion to and from ddmatrix to list-of-lists.

OK.


best
Robert