(FILECREATED " 3-Apr-85 10:22:41" {ERIS}<LISPNEW>LIBRARY>MATRIXUSEPATCH.;4 2731 changes to: (FNS MATMULT \CHECKVALIDARRAY GETELT SETELT) (VARS MATRIXUSEPATCHCOMS) previous date: " 2-Apr-85 13:59:15" {ERIS}<LISPNEW>LIBRARY>MATRIXUSEPATCH.;1) (* Copyright (c) 1985 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT MATRIXUSEPATCHCOMS) (RPAQQ MATRIXUSEPATCHCOMS [(FNS GETELT SETELT MATMULT \CHECKVALIDARRAY) (P (REMPROP (QUOTE SETELT) (QUOTE MACRO)) (REMPROP (QUOTE GETELT) (QUOTE MACRO]) (DEFINEQ (GETELT [LAMBDA (ARRAY ROW COLUMN EltsPerRow) (* hdj " 2-Apr-85 14:01") (if (ARRAYP ARRAY) then (if (IGEQ (ARRAYSIZE ARRAY) (IPLUS (SUB1 COLUMN) (ITIMES (SUB1 ROW) EltsPerRow))) then (\GETELT (fetch (ARRAYP BASE) of ARRAY) ROW COLUMN EltsPerRow) else (\ILLEGAL.ARG (LIST ROW COLUMN EltsPerRow))) else (\ILLEGAL.ARG ARRAY]) (SETELT [LAMBDA (ARRAY ROW COLUMN EltsPerRow VALUE) (* hdj " 2-Apr-85 14:01") (if (ARRAYP ARRAY) then (if (IGEQ (ARRAYSIZE ARRAY) (IPLUS (SUB1 COLUMN) (ITIMES (SUB1 ROW) EltsPerRow))) then (\SETELT (fetch (ARRAYP BASE) of ARRAY) ROW COLUMN EltsPerRow VALUE) else (\ILLEGAL.ARG (LIST ROW COLUMN EltsPerRow))) else (\ILLEGAL.ARG ARRAY]) (MATMULT [LAMBDA (MATRIXA MATRIXB MATRIXC K M N) (* hdj " 3-Apr-85 10:21") (* * multiply matrices of arbitrary size) (\CHECKVALIDARRAY MATRIXA (ITIMES K M) (QUOTE FLOATP)) (\CHECKVALIDARRAY MATRIXB (ITIMES M N) (QUOTE FLOATP)) (\CHECKVALIDARRAY MATRIXC (ITIMES K N) (QUOTE FLOATP)) (LET ((MATRIXABASE (fetch (ARRAYP BASE) of MATRIXA)) (MATRIXBBASE (fetch (ARRAYP BASE) of MATRIXB)) (MATRIXCBASE (fetch (ARRAYP BASE) of MATRIXC))) (\MATMULT MATRIXABASE MATRIXBBASE MATRIXCBASE K M N]) (\CHECKVALIDARRAY [LAMBDA (ARRAY ELEMENTS TYPE) (* hdj " 3-Apr-85 10:21") (if (AND (ARRAYP ARRAY) (IGEQ (ARRAYSIZE ARRAY) ELEMENTS) (EQ (ARRAYTYP ARRAY) TYPE)) then ARRAY else (\ILLEGAL.ARG ARRAY]) ) (REMPROP (QUOTE SETELT) (QUOTE MACRO)) (REMPROP (QUOTE GETELT) (QUOTE MACRO)) (PUTPROPS MATRIXUSEPATCH COPYRIGHT ("Xerox Corporation" 1985)) (DECLARE: DONTCOPY (FILEMAP (NIL (570 2564 (GETELT 580 . 1077) (SETELT 1079 . 1582) (MATMULT 1584 . 2249) ( \CHECKVALIDARRAY 2251 . 2562))))) STOP