
(/VERSIONCHECK 2) 

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

(PUT '|IIARRAY2;empty;$;2| '|SPADreplace| '(XLAM NIL (MAKE-ARRAY 0))) 

(DEFUN |IIARRAY2;empty;$;2| ($) (MAKE-ARRAY 0)) 

(DEFUN |IIARRAY2;new;2NniR$;3| (|rows| |cols| |a| $)
  (PROG (#1=#:G17781 |i| |arr|)
    (RETURN
     (SEQ
      (COND
       ((EQL |rows| 0)
        (|error| "new: arrays with zero rows are not supported"))
       ('T
        (SEQ
         (LETT |arr| (MAKEARR1 |rows| (MAKE-ARRAY 0))
               . #2=(|IIARRAY2;new;2NniR$;3|))
         (SEQ (LETT |i| 0 . #2#)
              (LETT #1# (SPADCALL |arr| (QREFELT $ 17)) . #2#) G190
              (COND ((QSGREATERP |i| #1#) (GO G191)))
              (SEQ (EXIT (QSETAREF1 |arr| |i| (MAKEARR1 |cols| |a|))))
              (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 $ 22)) (QREFELT $ 7)) 1)) 

(DEFUN |IIARRAY2;maxColIndex;$I;7| (|m| $)
  (- (+ (SPADCALL |m| (QREFELT $ 24)) (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 (QAREF1 |m| 0))))) 

(DEFUN |IIARRAY2;qelt;$2IR;10| (|m| |i| |j| $)
  (QAREF1 (QAREF1 |m| (- |i| (SPADCALL |m| (QREFELT $ 20))))
          (- |j| (SPADCALL |m| (QREFELT $ 21))))) 

(DEFUN |IIARRAY2;elt;$2IR;11| (|m| |i| |j| $)
  (COND
   ((OR (< |i| (SPADCALL |m| (QREFELT $ 20)))
        (< (SPADCALL |m| (QREFELT $ 23)) |i|))
    (|error| "elt: index out of range"))
   ((OR (< |j| (SPADCALL |m| (QREFELT $ 21)))
        (< (SPADCALL |m| (QREFELT $ 25)) |j|))
    (|error| "elt: index out of range"))
   ('T (SPADCALL |m| |i| |j| (QREFELT $ 26))))) 

(DEFUN |IIARRAY2;qsetelt!;$2I2R;12| (|m| |i| |j| |r| $)
  (QSETAREF1 (QAREF1 |m| (- |i| (SPADCALL |m| (QREFELT $ 20))))
             (- |j| (SPADCALL |m| (QREFELT $ 21))) |r|)) 

(DEFUN |IIARRAY2;setelt;$2I2R;13| (|m| |i| |j| |r| $)
  (COND
   ((OR (< |i| (SPADCALL |m| (QREFELT $ 20)))
        (< (SPADCALL |m| (QREFELT $ 23)) |i|))
    (|error| "setelt: index out of range"))
   ((OR (< |j| (SPADCALL |m| (QREFELT $ 21)))
        (< (SPADCALL |m| (QREFELT $ 25)) |j|))
    (|error| "setelt: index out of range"))
   ('T (SPADCALL |m| |i| |j| |r| (QREFELT $ 28))))) 

(DEFUN |IIARRAY2;latex;$S;14| (|m| $)
  (PROG (|s| #1=#:G17812 |j| #2=#:G17811 |i| #3=#:G17810)
    (RETURN
     (SEQ (LETT |s| "\\left[ \\begin{array}{" . #4=(|IIARRAY2;latex;$S;14|))
          (SEQ (LETT |j| (SPADCALL |m| (QREFELT $ 21)) . #4#)
               (LETT #3# (SPADCALL |m| (QREFELT $ 25)) . #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 $ 20)) . #4#)
               (LETT #2# (SPADCALL |m| (QREFELT $ 23)) . #4#) G190
               (COND ((> |i| #2#) #5#))
               (SEQ
                (SEQ (LETT |j| (SPADCALL |m| (QREFELT $ 21)) . #4#)
                     (LETT #1# (SPADCALL |m| (QREFELT $ 25)) . #4#) G190
                     (COND ((> |j| #1#) #5#))
                     (SEQ
                      (LETT |s|
                            (STRCONC |s|
                                     (SPADCALL
                                      (SPADCALL |m| |i| |j| (QREFELT $ 26))
                                      (QREFELT $ 31)))
                            . #4#)
                      (EXIT
                       (COND
                        ((< |j| (SPADCALL |m| (QREFELT $ 25)))
                         (LETT |s| (STRCONC |s| " & ") . #4#)))))
                     (LETT |j| (+ |j| 1) . #4#) #6# G191 (EXIT NIL))
                (EXIT
                 (COND
                  ((< |i| (SPADCALL |m| (QREFELT $ 23)))
                   (LETT |s| (STRCONC |s| " \\\\ ") . #4#)))))
               (LETT |i| (+ |i| 1) . #4#) #6# G191 (EXIT NIL))
          (EXIT (STRCONC |s| "\\end{array} \\right]")))))) 

(DEFUN |InnerIndexedTwoDimensionalArray| (&REST #1=#:G17817)
  (PROG ()
    (RETURN
     (PROG (#2=#:G17818)
       (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=#:G17816 $ |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 41) . #2#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3
                (LETT |pv$|
                      (|buildPredVector| 0 0
                                         (LIST
                                          (LETT #1#
                                                (|HasCategory| |#1|
                                                               '(|SetCategory|))
                                                . #2#)
                                          (AND
                                           (|HasCategory| |#1|
                                                          (LIST '|Evalable|
                                                                (|devaluate|
                                                                 |#1|)))
                                           #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 #1# (|HasCategory| $ '(|finiteAggregate|))
           (|augmentPredVector| $ 8))
      (QSETREFV $ 11 (|PrimitiveArray| (|PrimitiveArray| |#1|)))
      (COND
       ((|testBitVector| |pv$| 1)
        (QSETREFV $ 32 (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|
              (|Integer|) (5 . |maxIndex|) (|NonNegativeInteger|)
              |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|) (10 . |latex|)
              (15 . |latex|) (|List| 6) (|Equation| 6) (|List| 34)
              (|Mapping| 12 6) (|SingleInteger|) (|OutputForm|)
              (|Mapping| 6 6 6) (|Mapping| 6 6))
           '#(~= 20 |size?| 26 |setelt| 32 |setRow!| 40 |setColumn!| 47
              |sample| 54 |row| 58 |qsetelt!| 64 |qelt| 72 |parts| 79 |nrows|
              84 |new| 89 |ncols| 96 |more?| 101 |minRowIndex| 107
              |minColIndex| 112 |members| 117 |member?| 122 |maxRowIndex| 128
              |maxColIndex| 133 |map!| 138 |map| 144 |less?| 165 |latex| 171
              |hash| 176 |fill!| 181 |every?| 187 |eval| 193 |eq?| 219 |empty?|
              225 |empty| 230 |elt| 234 |count| 249 |copy| 261 |column| 266
              |coerce| 272 |any?| 277 = 283 |#| 289)
           '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| 38))
                   (|makeByteWordVec2| 40
                                       '(1 11 12 0 13 1 11 16 0 17 1 6 30 0 31
                                         1 0 30 0 32 2 1 12 0 0 1 2 0 12 0 18 1
                                         4 0 6 0 16 16 6 29 3 0 0 0 16 9 1 3 0
                                         0 0 16 10 1 0 0 0 1 2 0 9 0 16 1 4 0 6
                                         0 16 16 6 28 3 0 6 0 16 16 26 1 0 33 0
                                         1 1 0 18 0 22 3 0 0 18 18 6 19 1 0 18
                                         0 24 2 0 12 0 18 1 1 0 16 0 20 1 0 16
                                         0 21 1 3 33 0 1 2 4 12 6 0 1 1 0 16 0
                                         23 1 0 16 0 25 2 0 0 40 0 1 3 0 0 39 0
                                         0 1 4 0 0 39 0 0 6 1 2 0 0 40 0 1 2 0
                                         12 0 18 1 1 1 30 0 32 1 1 37 0 1 2 0 0
                                         0 6 1 2 3 12 36 0 1 3 2 0 0 6 6 1 3 2
                                         0 0 33 33 1 2 2 0 0 34 1 2 2 0 0 35 1
                                         2 0 12 0 0 1 1 0 12 0 14 0 0 0 15 4 0
                                         6 0 16 16 6 1 3 0 6 0 16 16 27 2 4 18
                                         6 0 1 2 3 18 36 0 1 1 0 0 0 1 2 0 10 0
                                         16 1 1 1 38 0 1 2 3 12 36 0 1 2 1 12 0
                                         0 1 1 3 18 0 1)))))
           '|lookupComplete|)) 
