Why I think lapack matrices should not be converted to list-of-lists.
Subject: Why I think lapack matrices should not be converted to list-of-lists.
From: Raymond Toy
Date: Wed, 03 Jan 2007 12:12:58 -0500
>>>>> "Richard" == Richard Fateman <fateman at cs.berkeley.edu> writes:
Richard> A full commitment to numerical matrix computation would provide the full
Richard> complement of representation possibilities, including triangular,
Richard> tridiagonal, symmetric, sparse, ... double, complex
Richard> I suggest the following:
Richard> (a) a new maxima "head" or "operator" which would be (say) ddmatrix for
Richard> dense matrix of real double floats, e.g. ((ddmatrix 10 20 simp) <a lisp
Richard> matrix compatible with C>)
Just a note about the actual implementation. First, Fortran arrays
are in column-major order but Lisp and C arrays are in row-major
order. To make this work, we need to hide this fact somehow. Perhaps
by making a[row,col] actually access element a(col,row).
Second, the f2cl translation only uses 1D arrays, even for 2D arrays.
This is done to make array slicing work out. (Array slicing is when
you call a function with an arg like x(2,10) to mean a submatrix
starting at element (2,10) and all the following elements.) This can
also be hidden by making a[row,col] access element a(row + col*ncol).
Ray