(SETF (MATRIX-REF ...) ... ) problem?

"Michael A. Koerber" <[email protected]> Wed, 01 Dec 2004 13:27:32 -0500
Newsgroups gmane.lisp.matlisp.user
Message-ID <[email protected]>
When using MATRIX-REF to set sub-matrixes of type COMPLEX-MATRIX  from 
type COMPLEX-MATRIX I get an error.

Type REAL-MATRIX from REAL-MATRIX is okay.

Type COMPLEX-MATRIX from REAL-MATRIX is okay.

The following code segment shows this.  I'm using 
matlisp-2.0beta-2003-10-14.tar.gz under FreeBSD 4.9.
I suspect the problem is in REF.LISP but haven't tracked it down.  Can 
anyone help?

tnx

mike

(setf *a* (m:zeros 5 2)
       *b* (m:ones  5 2)
       *c* (m:make-complex-matrix 5 2)
       *d* (m:m+ *b* (m:m* (sqrt -1) *b*)))

;; With reals all is well
(m:matrix-ref *a* (m:seq 0 4) 0)
(setf (m:matrix-ref *a* (m:seq 0 4) 0) (m:matrix-ref *b* (m:seq 0 4) 0))

;; With complex set from real all is well
(setf (m:matrix-ref *c* (m:seq 0 4) 1) (m:matrix-ref *b* (m:seq 0 4) 0))

;; With complex set from complex ... error
(m:matrix-ref *c* (m:seq 0 4) 0)
(setf (m:matrix-ref *c* (m:seq 0 4) 0) (m:matrix-ref *d* (m:seq 0 4) 0))



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/