Subject: Re: call-next-next-method
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1999/08/21
Newsgroups: comp.lang.lisp
Message-ID: <7plvq0$2usl7@fido.engr.sgi.com>
Erik Naggum  <erik@naggum.no> wrote:
+---------------
|   why is the following the wrong solution?
| 
| (defmethod mref ((A square-matrix) (i integer) (j integer))
|   (+ (mref (slot-value A 'lower-triangle) i j)
|      (mref (slot-value A 'upper-triangle) 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
upper-triangle representations usually *include* the main diagonal, so
if a square-matrix is just a struct of a lower and an upper, a bunch of
constructor-time & mutator-time constraint/consistency stuff is going to
be needed to guarantee that the two diagonals stay consistent!


-Rob

-----
Rob Warnock, 8L-846		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA