Erik Naggum <erik@naggum.no> wrote:
+
 why is the following the wrong solution?

 (defmethod mref ((A squarematrix) (i integer) (j integer))
 (+ (mref (slotvalue A 'lowertriangle) i j)
 (mref (slotvalue A 'uppertriangle) i j)))
+
Hmmm... There's something basically wrong with the whole approach of
the original problem statement that I just noticed in Erik's formulation
of this "mref", namely: In normal matrix algebra, both the lower and
uppertriangle representations usually *include* the main diagonal, so
if a squarematrix is just a struct of a lower and an upper, a bunch of
constructortime & mutatortime constraint/consistency stuff is going to
be needed to guarantee that the two diagonals stay consistent!
Rob

Rob Warnock, 8L846 rpw3@sgi.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 6509331673
1600 Amphitheatre Pkwy. FAX: 6509330511
Mountain View, CA 94043 PPASELIA