2 Robert Dodier, 2007-12-15
3 I release this file under the terms of the GNU General Public License.
5 amatrix is a matrix object which is implemented via an underlying
6 Lisp array (instead of a list of lists), and which supports row and/or
7 column subsets. As it stands, this code is experimental; its behavior
8 from the user's point of view could be modified, and it has bugs.
10 At present the following are recognized for row/column subset selection:
11 the literal symbol 'all, an integer, a list of integers, and a 1-row
12 or 1-column amatrix which contains expressions to be evaluated via
13 the Maxima function "is". Maybe the scheme for selecting elements via
14 Boolean expressions could be improved.
16 Relational operators do not distribute over amatrix. That would make
17 some selection constructs more legible (e.g. A[A[all, 1] = foo, all] to
18 select rows of A such that the element in column 1 is foo), but probably
19 it should not be automatic. It would be straightforward to implement
20 some rules via defrule and invoke them via explicitly, via a function
21 named, say, distribute_over_amatrix. But that is its own kind of
22 clumsiness ... In the absence of a clear direction, I'll just leave it
25 A copy-on-write scheme has been attempted, which shares storage
26 between an amatrix and any subset objects until one or the other
27 is modified. I'm pretty sure the copy-on-write scheme has bugs.
29 The wilcoxon program is an illustration of amatrix which computes
30 something of practical importance, the so-called Mann-Whitney-Wilcoxon
33 Replacing the existing matrix object by amatrix would be tedious,
34 although well within the realm of possibility. There are many bits
35 of Maxima source code which imagine they know the internal organization
36 of the matrix object; those would have to be replaced with calls to
37 functions within the amatrix package to obtain an element, the number