
(/VERSIONCHECK 2) 

(DEFUN |IIARRAY2;empty?;$B;1| (|m| $) (SPADCALL |m| (QREFELT $ 13))) 

(PUT '|IIARRAY2;empty;$;2| '|SPADreplace| '(XLAM NIL (GETREFV 0))) 

(DEFUN |IIARRAY2;empty;$;2| ($) (GETREFV 0)) 

(DEFUN |IIARRAY2;new;2NniR$;3| (|rows| |cols| |a| $)
  (PROG (#1=#:G678 |i| |arr|)
    (RETURN
     (SEQ
      (COND
       ((EQL |rows| 0)
        (|error| "new: arrays with zero rows are not supported"))
       ('T
        (SEQ
         (LETT |arr| (SPADCALL |rows| (GETREFV 0) (QREFELT $ 19))
               . #2=(|IIARRAY2;new;2NniR$;3|))
         (SEQ (LETT |i| 0 . #2#)
              (LETT #1# (SPADCALL |arr| (QREFELT $ 21)) . #2#) G190
              (COND ((QSGREATERP |i| #1#) (GO G191)))
              (SEQ
               (EXIT (SETELT |arr| |i| (SPADCALL |cols| |a| (QREFELT $ 22)))))
              (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191 (EXIT NIL))
         (EXIT |arr|)))))))) 

(DEFUN |IIARRAY2;minRowIndex;$I;4| (|m| $) (QREFELT $ 7)) 

(DEFUN |IIARRAY2;minColIndex;$I;5| (|m| $) (QREFELT $ 8)) 

(DEFUN |IIARRAY2;maxRowIndex;$I;6| (|m| $)
  (- (+ (SPADCALL |m| (QREFELT $ 26)) (QREFELT $ 7)) 1)) 

(DEFUN |IIARRAY2;maxColIndex;$I;7| (|m| $)
  (- (+ (SPADCALL |m| (QREFELT $ 28)) (QREFELT $ 8)) 1)) 

(PUT '|IIARRAY2;nrows;$Nni;8| '|SPADreplace| 'QVSIZE) 

(DEFUN |IIARRAY2;nrows;$Nni;8| (|m| $) (QVSIZE |m|)) 

(DEFUN |IIARRAY2;ncols;$Nni;9| (|m| $)
  (COND ((SPADCALL |m| (QREFELT $ 14)) 0) ('T (QVSIZE (ELT |m| 0))))) 

(DEFUN |IIARRAY2;qelt;$2IR;10| (|m| |i| |j| $)
  (ELT (ELT |m| (- |i| (SPADCALL |m| (QREFELT $ 24))))
       (- |j| (SPADCALL |m| (QREFELT $ 25))))) 

(DEFUN |IIARRAY2;elt;$2IR;11| (|m| |i| |j| $)
  (COND
   ((OR (< |i| (SPADCALL |m| (QREFELT $ 24)))
        (< (SPADCALL |m| (QREFELT $ 27)) |i|))
    (|error| "elt: index out of range"))
   ((OR (< |j| (SPADCALL |m| (QREFELT $ 25)))
        (< (SPADCALL |m| (QREFELT $ 29)) |j|))
    (|error| "elt: index out of range"))
   ('T (SPADCALL |m| |i| |j| (QREFELT $ 30))))) 

(DEFUN |IIARRAY2;qsetelt!;$2I2R;12| (|m| |i| |j| |r| $)
  (SETELT (ELT |m| (- |i| (SPADCALL |m| (QREFELT $ 24))))
          (- |j| (SPADCALL |m| (QREFELT $ 25))) |r|)) 

(DEFUN |IIARRAY2;setelt;$2I2R;13| (|m| |i| |j| |r| $)
  (COND
   ((OR (< |i| (SPADCALL |m| (QREFELT $ 24)))
        (< (SPADCALL |m| (QREFELT $ 27)) |i|))
    (|error| "setelt: index out of range"))
   ((OR (< |j| (SPADCALL |m| (QREFELT $ 25)))
        (< (SPADCALL |m| (QREFELT $ 29)) |j|))
    (|error| "setelt: index out of range"))
   ('T (SPADCALL |m| |i| |j| |r| (QREFELT $ 32))))) 

(DEFUN |IIARRAY2;latex;$S;14| (|m| $)
  (PROG (|s| #1=#:G709 |j| #2=#:G708 |i| #3=#:G707)
    (RETURN
     (SEQ (LETT |s| "\\left[ \\begin{array}{" . #4=(|IIARRAY2;latex;$S;14|))
          (SEQ (LETT |j| (SPADCALL |m| (QREFELT $ 25)) . #4#)
               (LETT #3# (SPADCALL |m| (QREFELT $ 29)) . #4#) G190
               (COND ((> |j| #3#) #5=(GO G191)))
               (SEQ (EXIT (LETT |s| (STRCONC |s| "c") . #4#)))
               (LETT |j| (+ |j| 1) . #4#) #6=(GO G190) G191 (EXIT NIL))
          (LETT |s| (STRCONC |s| "} ") . #4#)
          (SEQ (LETT |i| (SPADCALL |m| (QREFELT $ 24)) . #4#)
               (LETT #2# (SPADCALL |m| (QREFELT $ 27)) . #4#) G190
               (COND ((> |i| #2#) #5#))
               (SEQ
                (SEQ (LETT |j| (SPADCALL |m| (QREFELT $ 25)) . #4#)
                     (LETT #1# (SPADCALL |m| (QREFELT $ 29)) . #4#) G190
                     (COND ((> |j| #1#) #5#))
                     (SEQ
                      (LETT |s|
                            (STRCONC |s|
                                     (SPADCALL
                                      (SPADCALL |m| |i| |j| (QREFELT $ 30))
                                      (QREFELT $ 35)))
                            . #4#)
                      (EXIT
                       (COND
                        ((< |j| (SPADCALL |m| (QREFELT $ 29)))
                         (LETT |s| (STRCONC |s| " & ") . #4#)))))
                     (LETT |j| (+ |j| 1) . #4#) #6# G191 (EXIT NIL))
                (EXIT
                 (COND
                  ((< |i| (SPADCALL |m| (QREFELT $ 27)))
                   (LETT |s| (STRCONC |s| " \\\\ ") . #4#)))))
               (LETT |i| (+ |i| 1) . #4#) #6# G191 (EXIT NIL))
          (EXIT (STRCONC |s| "\\end{array} \\right]")))))) 

(DEFUN |InnerIndexedTwoDimensionalArray| (&REST #1=#:G714)
  (PROG ()
    (RETURN
     (PROG (#2=#:G715)
       (RETURN
        (COND
         ((LETT #2#
                (|lassocShiftWithFunction| (|devaluateList| #1#)
                                           (HGET |$ConstructorCache|
                                                 '|InnerIndexedTwoDimensionalArray|)
                                           '|domainEqualList|)
                . #3=(|InnerIndexedTwoDimensionalArray|))
          (|CDRwithIncrement| #2#))
         ('T
          (UNWIND-PROTECT
              (PROG1
                  (APPLY (|function| |InnerIndexedTwoDimensionalArray;|) #1#)
                (LETT #2# T . #3#))
            (COND
             ((NOT #2#)
              (HREM |$ConstructorCache|
                    '|InnerIndexedTwoDimensionalArray|))))))))))) 

(DEFUN |InnerIndexedTwoDimensionalArray;| (|#1| |#2| |#3| |#4| |#5|)
  (PROG (|pv$| #1=#:G713 $ |dv$| DV$5 DV$4 DV$3 DV$2 DV$1)
    (RETURN
     (PROGN
      (LETT DV$1 (|devaluate| |#1|) . #2=(|InnerIndexedTwoDimensionalArray|))
      (LETT DV$2 (|devaluate| |#2|) . #2#)
      (LETT DV$3 (|devaluate| |#3|) . #2#)
      (LETT DV$4 (|devaluate| |#4|) . #2#)
      (LETT DV$5 (|devaluate| |#5|) . #2#)
      (LETT |dv$|
            (LIST '|InnerIndexedTwoDimensionalArray| DV$1 DV$2 DV$3 DV$4 DV$5)
            . #2#)
      (LETT $ (GETREFV 45) . #2#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (LETT #1#
                                                (|HasCategory| |#1|
                                                               '(|SetCategory|))
                                                . #2#)
                                          (AND #1#
                                               (|HasCategory| |#1|
                                                              (LIST '|Evalable|
                                                                    (|devaluate|
                                                                     |#1|))))))
                      . #2#))
      (|haddProp| |$ConstructorCache| '|InnerIndexedTwoDimensionalArray|
                  (LIST DV$1 DV$2 DV$3 DV$4 DV$5) (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6 |#1|)
      (QSETREFV $ 7 |#2|)
      (QSETREFV $ 8 |#3|)
      (QSETREFV $ 9 |#4|)
      (QSETREFV $ 10 |#5|)
      (AND (|HasCategory| $ '(|finiteAggregate|)) (|augmentPredVector| $ 4))
      (AND (|HasCategory| $ '(|finiteAggregate|)) #1#
           (|augmentPredVector| $ 8))
      (QSETREFV $ 11 (|PrimitiveArray| (|PrimitiveArray| |#1|)))
      (COND
       ((|testBitVector| |pv$| 1)
        (QSETREFV $ 36 (CONS (|dispatchFunction| |IIARRAY2;latex;$S;14|) $))))
      $)))) 

(MAKEPROP '|InnerIndexedTwoDimensionalArray| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
              (|local| |#3|) (|local| |#4|) (|local| |#5|) '|Rep| (|Boolean|)
              (0 . |empty?|) |IIARRAY2;empty?;$B;1| |IIARRAY2;empty;$;2|
              (|NonNegativeInteger|) (|PrimitiveArray| 6) (|PrimitiveArray| 17)
              (5 . |new|) (|Integer|) (11 . |maxIndex|) (16 . |new|)
              |IIARRAY2;new;2NniR$;3| |IIARRAY2;minRowIndex;$I;4|
              |IIARRAY2;minColIndex;$I;5| |IIARRAY2;nrows;$Nni;8|
              |IIARRAY2;maxRowIndex;$I;6| |IIARRAY2;ncols;$Nni;9|
              |IIARRAY2;maxColIndex;$I;7| |IIARRAY2;qelt;$2IR;10|
              |IIARRAY2;elt;$2IR;11| |IIARRAY2;qsetelt!;$2I2R;12|
              |IIARRAY2;setelt;$2I2R;13| (|String|) (22 . |latex|)
              (27 . |latex|) (|List| 6) (|Equation| 6) (|List| 38)
              (|Mapping| 12 6) (|SingleInteger|) (|OutputForm|)
              (|Mapping| 6 6 6) (|Mapping| 6 6))
           '#(~= 32 |size?| 38 |setelt| 44 |setRow!| 52 |setColumn!| 59
              |sample| 66 |row| 70 |qsetelt!| 76 |qelt| 84 |parts| 91 |nrows|
              96 |new| 101 |ncols| 108 |more?| 113 |minRowIndex| 119
              |minColIndex| 124 |members| 129 |member?| 134 |maxRowIndex| 140
              |maxColIndex| 145 |map!| 150 |map| 156 |less?| 177 |latex| 183
              |hash| 188 |fill!| 193 |every?| 199 |eval| 205 |eq?| 231 |empty?|
              237 |empty| 242 |elt| 246 |count| 261 |copy| 273 |column| 278
              |coerce| 284 |any?| 289 = 295 |#| 301)
           'NIL
           (CONS (|makeByteWordVec2| 2 '(0 0 0 2 1 0 0 0 2 1 1))
                 (CONS
                  '#(|TwoDimensionalArrayCategory&| |HomogeneousAggregate&|
                     |Aggregate&| |Evalable&| |SetCategory&| NIL NIL NIL
                     |InnerEvalable&| |BasicType&| NIL)
                  (CONS
                   '#((|TwoDimensionalArrayCategory| 6 9 10)
                      (|HomogeneousAggregate| 6) (|Aggregate|) (|Evalable| 6)
                      (|SetCategory|) (|Type|) (|finiteAggregate|)
                      (|shallowlyMutable|) (|InnerEvalable| 6 6) (|BasicType|)
                      (|CoercibleTo| 42))
                   (|makeByteWordVec2| 44
                                       '(1 11 12 0 13 2 18 0 16 17 19 1 11 20 0
                                         21 2 17 0 16 6 22 1 6 34 0 35 1 0 34 0
                                         36 2 1 12 0 0 1 2 0 12 0 16 1 4 0 6 0
                                         20 20 6 33 3 0 0 0 20 9 1 3 0 0 0 20
                                         10 1 0 0 0 1 2 0 9 0 20 1 4 0 6 0 20
                                         20 6 32 3 0 6 0 20 20 30 1 0 37 0 1 1
                                         0 16 0 26 3 0 0 16 16 6 23 1 0 16 0 28
                                         2 0 12 0 16 1 1 0 20 0 24 1 0 20 0 25
                                         1 3 37 0 1 2 4 12 6 0 1 1 0 20 0 27 1
                                         0 20 0 29 2 0 0 44 0 1 3 0 0 43 0 0 1
                                         4 0 0 43 0 0 6 1 2 0 0 44 0 1 2 0 12 0
                                         16 1 1 1 34 0 36 1 1 41 0 1 2 0 0 0 6
                                         1 2 3 12 40 0 1 3 2 0 0 6 6 1 3 2 0 0
                                         37 37 1 2 2 0 0 38 1 2 2 0 0 39 1 2 0
                                         12 0 0 1 1 0 12 0 14 0 0 0 15 4 0 6 0
                                         20 20 6 1 3 0 6 0 20 20 31 2 4 16 6 0
                                         1 2 3 16 40 0 1 1 0 0 0 1 2 0 10 0 20
                                         1 1 1 42 0 1 2 3 12 40 0 1 2 1 12 0 0
                                         1 1 3 16 0 1)))))
           '|lookupComplete|)) 
