
(SDEFUN |WGRPH;weightedGraph;L$;1| ((|ob| |List| S) ($ $))
        (SPROG
         ((|objs|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
          (#1=#:G741 NIL) (|x| NIL) (#2=#:G740 NIL))
         (SEQ
          (LETT |objs|
                (PROGN
                 (LETT #2# NIL . #3=(|WGRPH;weightedGraph;L$;1|))
                 (SEQ (LETT |x| NIL . #3#) (LETT #1# |ob| . #3#) G190
                      (COND
                       ((OR (ATOM #1#) (PROGN (LETT |x| (CAR #1#) . #3#) NIL))
                        (GO G191)))
                      (SEQ
                       (EXIT
                        (LETT #2#
                              (CONS (VECTOR |x| 0 0 (|spadConstant| $ 9)) #2#)
                              . #3#)))
                      (LETT #1# (CDR #1#) . #3#) (GO G190) G191
                      (EXIT (NREVERSE #2#))))
                . #3#)
          (EXIT (CONS |objs| NIL))))) 

(PUT '|WGRPH;weightedGraph;L$;2| '|SPADreplace| '(XLAM (|ob|) (CONS |ob| NIL))) 

(SDEFUN |WGRPH;weightedGraph;L$;2|
        ((|ob| |List|
          (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                    (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W)))
         ($ $))
        (CONS |ob| NIL)) 

(PUT '|WGRPH;weightedGraph;LL$;3| '|SPADreplace| 'CONS) 

(SDEFUN |WGRPH;weightedGraph;LL$;3|
        ((|ob| |List|
          (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                    (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W)))
         (|ar| |List|
          (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                    (|:| |fromOb| (|NonNegativeInteger|))
                    (|:| |toOb| (|NonNegativeInteger|))
                    (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                    (|:| |map| (|List| (|NonNegativeInteger|)))))
         ($ $))
        (CONS |ob| |ar|)) 

(SDEFUN |WGRPH;weightedGraph;LL$;4|
        ((|ob| |List|
          (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                    (|:| |posY| (|NonNegativeInteger|))))
         (|ar| |List|
          (|Record| (|:| |name| (|String|))
                    (|:| |arrType| (|NonNegativeInteger|))
                    (|:| |fromOb| (|NonNegativeInteger|))
                    (|:| |toOb| (|NonNegativeInteger|))
                    (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                    (|:| |map| (|List| (|NonNegativeInteger|)))))
         ($ $))
        (SPROG
         ((|fobs|
           (|List|
            #1=(|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                         (|:| |posY| (|NonNegativeInteger|))
                         (|:| |weight| W))))
          (|fo| #1#) (#2=#:G782 NIL) (|f| NIL) (#3=#:G783 NIL) (|fn| NIL)
          (|arrs|
           (|List|
            #4=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|arro| #4#) (#5=#:G781 NIL) (|a| NIL))
         (SEQ (LETT |arrs| NIL . #6=(|WGRPH;weightedGraph;LL$;4|))
              (SEQ (LETT |a| NIL . #6#) (LETT #5# |ar| . #6#) G190
                   (COND
                    ((OR (ATOM #5#) (PROGN (LETT |a| (CAR #5#) . #6#) NIL))
                     (GO G191)))
                   (SEQ
                    (LETT |arro|
                          (VECTOR (QVELT |a| 0) (|spadConstant| $ 9)
                                  (QVELT |a| 2) (QVELT |a| 3) (QVELT |a| 4)
                                  (QVELT |a| 5) (QVELT |a| 6))
                          . #6#)
                    (EXIT
                     (LETT |arrs| (SPADCALL |arrs| |arro| (QREFELT $ 18))
                           . #6#)))
                   (LETT #5# (CDR #5#) . #6#) (GO G190) G191 (EXIT NIL))
              (LETT |fobs| NIL . #6#)
              (SEQ (LETT |fn| 1 . #6#) (LETT #3# (LENGTH |ob|) . #6#)
                   (LETT |f| NIL . #6#) (LETT #2# |ob| . #6#) G190
                   (COND
                    ((OR (ATOM #2#) (PROGN (LETT |f| (CAR #2#) . #6#) NIL)
                         (|greater_SI| |fn| #3#))
                     (GO G191)))
                   (SEQ
                    (LETT |fo|
                          (VECTOR (QVELT |f| 0) (QVELT |f| 1) (QVELT |f| 2)
                                  (|spadConstant| $ 9))
                          . #6#)
                    (EXIT
                     (LETT |fobs| (SPADCALL |fobs| |fo| (QREFELT $ 19))
                           . #6#)))
                   (LETT #2#
                         (PROG1 (CDR #2#) (LETT |fn| (|inc_SI| |fn|) . #6#))
                         . #6#)
                   (GO G190) G191 (EXIT NIL))
              (EXIT (CONS |fobs| |arrs|))))) 

(SDEFUN |WGRPH;weightedGraph;LL$;5|
        ((|obs| |List| S)
         (|ars| |List|
          (|Record| (|:| |fromOb| (|NonNegativeInteger|))
                    (|:| |toOb| (|NonNegativeInteger|))))
         ($ $))
        (SPROG
         ((|edges|
           (|List|
            (|Record| (|:| |name| (|String|))
                      (|:| |arrType| (|NonNegativeInteger|))
                      (|:| |fromOb| (|NonNegativeInteger|))
                      (|:| |toOb| (|NonNegativeInteger|))
                      (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                      (|:| |map| (|List| (|NonNegativeInteger|))))))
          (#1=#:G797 NIL) (|ar| NIL) (#2=#:G798 NIL) (|arn| NIL)
          (|nodes|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)))))
          (|o|
           (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                     (|:| |posY| (|NonNegativeInteger|))))
          (#3=#:G795 NIL) (|ob| NIL) (#4=#:G796 NIL) (|obn| NIL))
         (SEQ (LETT |nodes| NIL . #5=(|WGRPH;weightedGraph;LL$;5|))
              (SEQ (LETT |obn| 1 . #5#) (LETT #4# (LENGTH |obs|) . #5#)
                   (LETT |ob| NIL . #5#) (LETT #3# |obs| . #5#) G190
                   (COND
                    ((OR (ATOM #3#) (PROGN (LETT |ob| (CAR #3#) . #5#) NIL)
                         (|greater_SI| |obn| #4#))
                     (GO G191)))
                   (SEQ
                    (LETT |o|
                          (VECTOR |ob|
                                  (SPADCALL (LENGTH |obs|) |obn|
                                            (QREFELT $ 26))
                                  (SPADCALL (LENGTH |obs|) |obn|
                                            (QREFELT $ 27)))
                          . #5#)
                    (EXIT
                     (LETT |nodes| (SPADCALL |nodes| |o| (QREFELT $ 28))
                           . #5#)))
                   (LETT #3#
                         (PROG1 (CDR #3#) (LETT |obn| (|inc_SI| |obn|) . #5#))
                         . #5#)
                   (GO G190) G191 (EXIT NIL))
              (LETT |edges| NIL . #5#)
              (SEQ (LETT |arn| 1 . #5#) (LETT #2# (LENGTH |ars|) . #5#)
                   (LETT |ar| NIL . #5#) (LETT #1# |ars| . #5#) G190
                   (COND
                    ((OR (ATOM #1#) (PROGN (LETT |ar| (CAR #1#) . #5#) NIL)
                         (|greater_SI| |arn| #2#))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (LETT |edges|
                           (SPADCALL |edges|
                                     (VECTOR (STRCONC "a" (STRINGIMAGE |arn|))
                                             0 (QCAR |ar|) (QCDR |ar|) 0 0 NIL)
                                     (QREFELT $ 29))
                           . #5#)))
                   (LETT #1#
                         (PROG1 (CDR #1#) (LETT |arn| (|inc_SI| |arn|) . #5#))
                         . #5#)
                   (GO G190) G191 (EXIT NIL))
              (EXIT (SPADCALL |nodes| |edges| (QREFELT $ 24)))))) 

(SDEFUN |WGRPH;weightedGraph;Fp$;6| ((|poset| |FinitePoset| S) ($ $))
        (SPROG
         ((|ars|
           (|List|
            #1=(|Record| (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|)))))
          (|z| #1#) (#2=#:G807 NIL) (|y| NIL) (#3=#:G808 NIL) (|yn| NIL)
          (#4=#:G805 NIL) (|x| NIL) (#5=#:G806 NIL) (|xn| NIL)
          (|mat| (|List| (|List| (|Boolean|)))) (|obs| (|List| S)))
         (SEQ
          (LETT |obs| (SPADCALL |poset| (QREFELT $ 34))
                . #6=(|WGRPH;weightedGraph;Fp$;6|))
          (LETT |ars| NIL . #6#)
          (LETT |mat| (SPADCALL |poset| (QREFELT $ 36)) . #6#)
          (SEQ (LETT |xn| 1 . #6#) (LETT #5# (LENGTH |mat|) . #6#)
               (LETT |x| NIL . #6#) (LETT #4# |mat| . #6#) G190
               (COND
                ((OR (ATOM #4#) (PROGN (LETT |x| (CAR #4#) . #6#) NIL)
                     (|greater_SI| |xn| #5#))
                 (GO G191)))
               (SEQ
                (EXIT
                 (SEQ (LETT |yn| 1 . #6#) (LETT #3# (LENGTH |x|) . #6#)
                      (LETT |y| NIL . #6#) (LETT #2# |x| . #6#) G190
                      (COND
                       ((OR (ATOM #2#) (PROGN (LETT |y| (CAR #2#) . #6#) NIL)
                            (|greater_SI| |yn| #3#))
                        (GO G191)))
                      (SEQ
                       (EXIT
                        (COND
                         (|y|
                          (SEQ (LETT |z| (CONS |xn| |yn|) . #6#)
                               (EXIT
                                (LETT |ars| (SPADCALL |ars| |z| (QREFELT $ 37))
                                      . #6#)))))))
                      (LETT #2#
                            (PROG1 (CDR #2#) (LETT |yn| (|inc_SI| |yn|) . #6#))
                            . #6#)
                      (GO G190) G191 (EXIT NIL))))
               (LETT #4# (PROG1 (CDR #4#) (LETT |xn| (|inc_SI| |xn|) . #6#))
                     . #6#)
               (GO G190) G191 (EXIT NIL))
          (EXIT (SPADCALL |obs| |ars| (QREFELT $ 32)))))) 

(SDEFUN |WGRPH;weightedGraph;LL$;7|
        ((|objs| |List| S) (|am| |List| (|List| (|NonNegativeInteger|))) ($ $))
        (SPROG
         ((|ar|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|a| #1#) (#2=#:G824 NIL) (|j| NIL) (#3=#:G823 NIL) (|i| NIL)
          (|obs|
           (|List|
            #4=(|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                         (|:| |posY| (|NonNegativeInteger|))
                         (|:| |weight| W))))
          (|o| #4#) (|ob| (S)) (#5=#:G822 NIL) (|obn| NIL))
         (SEQ (LETT |obs| NIL . #6=(|WGRPH;weightedGraph;LL$;7|))
              (SEQ (LETT |obn| 1 . #6#) (LETT #5# (LENGTH |objs|) . #6#) G190
                   (COND ((|greater_SI| |obn| #5#) (GO G191)))
                   (SEQ
                    (LETT |ob| (SPADCALL |objs| |obn| (QREFELT $ 40)) . #6#)
                    (LETT |o|
                          (VECTOR |ob|
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 26))
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 27))
                                  (|spadConstant| $ 9))
                          . #6#)
                    (EXIT
                     (LETT |obs| (SPADCALL |obs| |o| (QREFELT $ 19)) . #6#)))
                   (LETT |obn| (|inc_SI| |obn|) . #6#) (GO G190) G191
                   (EXIT NIL))
              (LETT |ar| NIL . #6#)
              (SEQ (LETT |i| 1 . #6#) (LETT #3# (LENGTH |am|) . #6#) G190
                   (COND ((|greater_SI| |i| #3#) (GO G191)))
                   (SEQ
                    (EXIT
                     (SEQ (LETT |j| 1 . #6#)
                          (LETT #2#
                                (SPADCALL (SPADCALL |am| |i| (QREFELT $ 43))
                                          (QREFELT $ 44))
                                . #6#)
                          G190 (COND ((|greater_SI| |j| #2#) (GO G191)))
                          (SEQ
                           (EXIT
                            (COND
                             ((EQL
                               (SPADCALL (SPADCALL |am| |i| (QREFELT $ 43)) |j|
                                         (QREFELT $ 45))
                               1)
                              (SEQ
                               (LETT |a|
                                     (VECTOR "a" (|spadConstant| $ 9) |i| |j| 0
                                             0 NIL)
                                     . #6#)
                               (EXIT
                                (LETT |ar| (SPADCALL |ar| |a| (QREFELT $ 18))
                                      . #6#)))))))
                          (LETT |j| (|inc_SI| |j|) . #6#) (GO G190) G191
                          (EXIT NIL))))
                   (LETT |i| (|inc_SI| |i|) . #6#) (GO G190) G191 (EXIT NIL))
              (EXIT (CONS |obs| |ar|))))) 

(SDEFUN |WGRPH;addObject!;$S$;8| ((|s| $) (|n| S) ($ $))
        (SPROG
         ((|obj|
           (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                     (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W)))
          (|obs|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W)))))
         (SEQ (LETT |obs| (QCAR |s|) . #1=(|WGRPH;addObject!;$S$;8|))
              (LETT |obj| (VECTOR |n| 0 0 (|spadConstant| $ 9)) . #1#)
              (COND
               ((SPADCALL |obs| NIL (QREFELT $ 48))
                (PROGN (RPLACA |s| (LIST |obj|)) (QCAR |s|)))
               ('T
                (PROGN
                 (RPLACA |s| (SPADCALL |obs| |obj| (QREFELT $ 19)))
                 (QCAR |s|))))
              (EXIT |s|)))) 

(SDEFUN |WGRPH;addObject!;$R$;9|
        ((|s| $)
         (|n| |Record| (|:| |value| S) (|:| |posX| #1=(|NonNegativeInteger|))
          (|:| |posY| #1#))
         ($ $))
        (SEQ
         (|error|
          "this form of addObject! not supported in multifunctionGraph")
         (EXIT (CONS NIL NIL)))) 

(SDEFUN |WGRPH;addArrow!;$R$;10|
        ((|s| $)
         (|ar| |Record| (|:| |name| (|String|))
          (|:| |arrType| #1=(|NonNegativeInteger|)) (|:| |fromOb| #1#)
          (|:| |toOb| #1#) (|:| |xOffset| #2=(|Integer|)) (|:| |yOffset| #2#)
          (|:| |map| (|List| #1#)))
         ($ $))
        (SPADCALL |s| (QVELT |ar| 0) (QVELT |ar| 2) (QVELT |ar| 3)
                  (|spadConstant| $ 9) (QREFELT $ 52))) 

(SDEFUN |WGRPH;addArrow!;$S2Nni$;11|
        ((|s| $) (|nm| |String|) (|n1| . #1=(|NonNegativeInteger|))
         (|n2| . #1#) ($ $))
        (SPADCALL |s| |nm| |n1| |n2| (|spadConstant| $ 9) (QREFELT $ 52))) 

(SDEFUN |WGRPH;addWArrow!;$S2NniW$;12|
        ((|s| $) (|nm| |String|) (|n1| |NonNegativeInteger|)
         (|n2| |NonNegativeInteger|) (|w| W) ($ $))
        (SPROG
         ((#1=#:G845 NIL)
          (|arrs|
           (|List|
            (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                      (|:| |fromOb| (|NonNegativeInteger|))
                      (|:| |toOb| (|NonNegativeInteger|))
                      (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                      (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|a|
           (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                     (|:| |fromOb| (|NonNegativeInteger|))
                     (|:| |toOb| (|NonNegativeInteger|))
                     (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                     (|:| |map| (|List| (|NonNegativeInteger|)))))
          (|arrss|
           (|List|
            (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                      (|:| |fromOb| (|NonNegativeInteger|))
                      (|:| |toOb| (|NonNegativeInteger|))
                      (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                      (|:| |map| (|List| (|NonNegativeInteger|)))))))
         (SEQ
          (EXIT
           (SEQ (LETT |arrss| (QCDR |s|) . #2=(|WGRPH;addWArrow!;$S2NniW$;12|))
                (LETT |a| (VECTOR |nm| |w| |n1| |n2| 0 0 NIL) . #2#)
                (EXIT
                 (COND
                  ((SPADCALL |arrss| NIL (QREFELT $ 55))
                   (SEQ (PROGN (RPLACD |s| (LIST |a|)) (QCDR |s|))
                        (EXIT (PROGN (LETT #1# |s| . #2#) (GO #3=#:G844)))))
                  ('T
                   (SEQ
                    (LETT |arrs| (SPADCALL |arrss| |a| (QREFELT $ 18)) . #2#)
                    (PROGN (RPLACD |s| |arrs|) (QCDR |s|))
                    (EXIT (PROGN (LETT #1# |s| . #2#) (GO #3#)))))))))
          #3# (EXIT #1#)))) 

(SDEFUN |WGRPH;getVertices;$L;13|
        ((|s| $)
         ($ |List|
          #1=(|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                       (|:| |posY| (|NonNegativeInteger|)))))
        (SPROG
         ((|res|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)))))
          (|o| #1#) (#2=#:G852 NIL) (|soj| NIL))
         (SEQ (LETT |res| NIL . #3=(|WGRPH;getVertices;$L;13|))
              (SEQ (LETT |soj| NIL . #3#) (LETT #2# (QCAR |s|) . #3#) G190
                   (COND
                    ((OR (ATOM #2#) (PROGN (LETT |soj| (CAR #2#) . #3#) NIL))
                     (GO G191)))
                   (SEQ
                    (LETT |o|
                          (VECTOR (QVELT |soj| 0) (QVELT |soj| 1)
                                  (QVELT |soj| 2))
                          . #3#)
                    (EXIT
                     (LETT |res| (SPADCALL |res| |o| (QREFELT $ 28)) . #3#)))
                   (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
              (EXIT |res|)))) 

(SDEFUN |WGRPH;getArrows;$L;14|
        ((|s| $)
         ($ |List|
          #1=(|Record| (|:| |name| (|String|))
                       (|:| |arrType| (|NonNegativeInteger|))
                       (|:| |fromOb| (|NonNegativeInteger|))
                       (|:| |toOb| (|NonNegativeInteger|))
                       (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                       (|:| |map| (|List| (|NonNegativeInteger|))))))
        (SPROG
         ((|arrs|
           (|List|
            (|Record| (|:| |name| (|String|))
                      (|:| |arrType| (|NonNegativeInteger|))
                      (|:| |fromOb| (|NonNegativeInteger|))
                      (|:| |toOb| (|NonNegativeInteger|))
                      (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                      (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|aw| #1#) (#2=#:G859 NIL) (|a| NIL))
         (SEQ (LETT |arrs| NIL . #3=(|WGRPH;getArrows;$L;14|))
              (SEQ (LETT |a| NIL . #3#) (LETT #2# (QCDR |s|) . #3#) G190
                   (COND
                    ((OR (ATOM #2#) (PROGN (LETT |a| (CAR #2#) . #3#) NIL))
                     (GO G191)))
                   (SEQ
                    (LETT |aw|
                          (VECTOR (QVELT |a| 0) 0 (QVELT |a| 2) (QVELT |a| 3)
                                  (QVELT |a| 4) (QVELT |a| 5) (QVELT |a| 6))
                          . #3#)
                    (EXIT
                     (LETT |arrs| (SPADCALL |arrs| |aw| (QREFELT $ 29))
                           . #3#)))
                   (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
              (EXIT |arrs|)))) 

(PUT '|WGRPH;initial;$;15| '|SPADreplace| '(XLAM NIL (CONS NIL NIL))) 

(SDEFUN |WGRPH;initial;$;15| (($ $)) (CONS NIL NIL)) 

(SDEFUN |WGRPH;terminal;S$;16| ((|a| S) ($ $))
        (SPROG
         ((|ar|
           (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                     (|:| |fromOb| (|NonNegativeInteger|))
                     (|:| |toOb| (|NonNegativeInteger|))
                     (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                     (|:| |map| (|List| (|NonNegativeInteger|)))))
          (|o|
           (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                     (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
         (SEQ
          (LETT |o| (VECTOR |a| 0 0 (|spadConstant| $ 9))
                . #1=(|WGRPH;terminal;S$;16|))
          (LETT |ar| (VECTOR "loop" (|spadConstant| $ 9) 1 1 0 0 NIL) . #1#)
          (EXIT (CONS (LIST |o|) (LIST |ar|)))))) 

(SDEFUN |WGRPH;cycleOpen;LS$;17|
        ((|objs| |List| S) (|arrowName| |String|) ($ $))
        (SPROG
         ((|arn| (|Integer|))
          (|ars|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|a| #1#) (|next| (|NonNegativeInteger|))
          (|obs|
           (|List|
            #2=(|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                         (|:| |posY| (|NonNegativeInteger|))
                         (|:| |weight| W))))
          (|o| #2#) (|ob| (S)) (#3=#:G875 NIL) (|obn| NIL))
         (SEQ (LETT |obs| NIL . #4=(|WGRPH;cycleOpen;LS$;17|))
              (LETT |ars| NIL . #4#) (LETT |arn| 1 . #4#)
              (SEQ (LETT |obn| 1 . #4#) (LETT #3# (LENGTH |objs|) . #4#) G190
                   (COND ((|greater_SI| |obn| #3#) (GO G191)))
                   (SEQ
                    (LETT |ob| (SPADCALL |objs| |obn| (QREFELT $ 40)) . #4#)
                    (LETT |o|
                          (VECTOR |ob|
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 26))
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 27))
                                  (|spadConstant| $ 9))
                          . #4#)
                    (LETT |obs| (SPADCALL |obs| |o| (QREFELT $ 19)) . #4#)
                    (LETT |next| (+ |obn| 1) . #4#)
                    (EXIT
                     (COND
                      ((SPADCALL |next| (LENGTH |objs|) (QREFELT $ 60))
                       (SEQ
                        (LETT |a|
                              (VECTOR (STRCONC |arrowName| (STRINGIMAGE |arn|))
                                      (|spadConstant| $ 9) |obn| |next| 0 0
                                      NIL)
                              . #4#)
                        (LETT |ars| (SPADCALL |ars| |a| (QREFELT $ 18)) . #4#)
                        (EXIT (LETT |arn| (+ |arn| 1) . #4#)))))))
                   (LETT |obn| (|inc_SI| |obn|) . #4#) (GO G190) G191
                   (EXIT NIL))
              (EXIT (CONS |obs| |ars|))))) 

(SDEFUN |WGRPH;cycleClosed;LS$;18|
        ((|objs| |List| S) (|arrowName| |String|) ($ $))
        (SPROG
         ((|arn| (|Integer|))
          (|ars|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|a| #1#) (|next| (|NonNegativeInteger|))
          (|obs|
           (|List|
            #2=(|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                         (|:| |posY| (|NonNegativeInteger|))
                         (|:| |weight| W))))
          (|o| #2#) (|ob| (S)) (#3=#:G885 NIL) (|obn| NIL))
         (SEQ (LETT |obs| NIL . #4=(|WGRPH;cycleClosed;LS$;18|))
              (LETT |ars| NIL . #4#) (LETT |arn| 1 . #4#)
              (SEQ (LETT |obn| 1 . #4#) (LETT #3# (LENGTH |objs|) . #4#) G190
                   (COND ((|greater_SI| |obn| #3#) (GO G191)))
                   (SEQ
                    (LETT |ob| (SPADCALL |objs| |obn| (QREFELT $ 40)) . #4#)
                    (LETT |o|
                          (VECTOR |ob|
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 26))
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 27))
                                  (|spadConstant| $ 9))
                          . #4#)
                    (LETT |obs| (SPADCALL |obs| |o| (QREFELT $ 19)) . #4#)
                    (LETT |next| (+ |obn| 1) . #4#)
                    (COND
                     ((EQL (- |next| 1) (LENGTH |objs|))
                      (LETT |next| 1 . #4#)))
                    (EXIT
                     (COND
                      ((SPADCALL |next| (LENGTH |objs|) (QREFELT $ 60))
                       (SEQ
                        (LETT |a|
                              (VECTOR (STRCONC |arrowName| (STRINGIMAGE |arn|))
                                      (|spadConstant| $ 9) |obn| |next| 0 0
                                      NIL)
                              . #4#)
                        (LETT |ars| (SPADCALL |ars| |a| (QREFELT $ 18)) . #4#)
                        (EXIT (LETT |arn| (+ |arn| 1) . #4#)))))))
                   (LETT |obn| (|inc_SI| |obn|) . #4#) (GO G190) G191
                   (EXIT NIL))
              (EXIT (CONS |obs| |ars|))))) 

(SDEFUN |WGRPH;unit;LS$;19| ((|objs| |List| S) (|arrowName| |String|) ($ $))
        (SPROG
         ((|arn| (|Integer|))
          (|ars|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|a| #1#)
          (|obs|
           (|List|
            #2=(|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                         (|:| |posY| (|NonNegativeInteger|))
                         (|:| |weight| W))))
          (|o| #2#) (|ob| (S)) (#3=#:G893 NIL) (|obn| NIL))
         (SEQ (LETT |obs| NIL . #4=(|WGRPH;unit;LS$;19|))
              (LETT |ars| NIL . #4#) (LETT |arn| 1 . #4#)
              (SEQ (LETT |obn| 1 . #4#) (LETT #3# (LENGTH |objs|) . #4#) G190
                   (COND ((|greater_SI| |obn| #3#) (GO G191)))
                   (SEQ
                    (LETT |ob| (SPADCALL |objs| |obn| (QREFELT $ 40)) . #4#)
                    (LETT |o|
                          (VECTOR |ob|
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 26))
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 27))
                                  (|spadConstant| $ 9))
                          . #4#)
                    (LETT |obs| (SPADCALL |obs| |o| (QREFELT $ 19)) . #4#)
                    (LETT |a|
                          (VECTOR (STRCONC |arrowName| (STRINGIMAGE |arn|))
                                  (|spadConstant| $ 9) |obn| |obn| 0 0 NIL)
                          . #4#)
                    (LETT |ars| (SPADCALL |ars| |a| (QREFELT $ 18)) . #4#)
                    (EXIT (LETT |arn| (+ |arn| 1) . #4#)))
                   (LETT |obn| (|inc_SI| |obn|) . #4#) (GO G190) G191
                   (EXIT NIL))
              (EXIT (CONS |obs| |ars|))))) 

(SDEFUN |WGRPH;kgraph;LS$;20| ((|objs| |List| S) (|arrowName| |String|) ($ $))
        (SPROG
         ((|arn| (|Integer|))
          (|ars|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|a| #1#) (#2=#:G905 NIL) (|obm| NIL)
          (|obs|
           (|List|
            #3=(|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                         (|:| |posY| (|NonNegativeInteger|))
                         (|:| |weight| W))))
          (|o| #3#) (|ob| (S)) (#4=#:G904 NIL) (|obn| NIL))
         (SEQ (LETT |obs| NIL . #5=(|WGRPH;kgraph;LS$;20|))
              (LETT |ars| NIL . #5#) (LETT |arn| 1 . #5#)
              (SEQ (LETT |obn| 1 . #5#) (LETT #4# (LENGTH |objs|) . #5#) G190
                   (COND ((|greater_SI| |obn| #4#) (GO G191)))
                   (SEQ
                    (LETT |ob| (SPADCALL |objs| |obn| (QREFELT $ 40)) . #5#)
                    (LETT |o|
                          (VECTOR |ob|
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 26))
                                  (SPADCALL (LENGTH |objs|) |obn|
                                            (QREFELT $ 27))
                                  (|spadConstant| $ 9))
                          . #5#)
                    (LETT |obs| (SPADCALL |obs| |o| (QREFELT $ 19)) . #5#)
                    (EXIT
                     (SEQ (LETT |obm| 1 . #5#) (LETT #2# (LENGTH |objs|) . #5#)
                          G190 (COND ((|greater_SI| |obm| #2#) (GO G191)))
                          (SEQ
                           (EXIT
                            (COND
                             ((SPADCALL |obn| |obm| (QREFELT $ 64))
                              (SEQ
                               (LETT |a|
                                     (VECTOR
                                      (STRCONC |arrowName| (STRINGIMAGE |arn|))
                                      (|spadConstant| $ 9) |obn| |obm| 0 0 NIL)
                                     . #5#)
                               (LETT |ars| (SPADCALL |ars| |a| (QREFELT $ 18))
                                     . #5#)
                               (EXIT (LETT |arn| (+ |arn| 1) . #5#)))))))
                          (LETT |obm| (|inc_SI| |obm|) . #5#) (GO G190) G191
                          (EXIT NIL))))
                   (LETT |obn| (|inc_SI| |obn|) . #5#) (GO G190) G191
                   (EXIT NIL))
              (EXIT (CONS |obs| |ars|))))) 

(SDEFUN |WGRPH;+;3$;21| ((|a| $) (|b| $) ($ $))
        (SPROG
         ((|la|
           (|List|
            (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                      (|:| |fromOb| (|NonNegativeInteger|))
                      (|:| |toOb| (|NonNegativeInteger|))
                      (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                      (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|lb|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|arr| #1#) (#2=#:G913 NIL) (|ba| NIL)
          (|bStart| (|NonNegativeInteger|))
          (|lo|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W)))))
         (SEQ
          (LETT |lo| (SPADCALL (QCAR |a|) (QCAR |b|) (QREFELT $ 66))
                . #3=(|WGRPH;+;3$;21|))
          (LETT |bStart| (LENGTH (QCAR |a|)) . #3#) (LETT |lb| NIL . #3#)
          (SEQ (LETT |ba| NIL . #3#) (LETT #2# (QCDR |b|) . #3#) G190
               (COND
                ((OR (ATOM #2#) (PROGN (LETT |ba| (CAR #2#) . #3#) NIL))
                 (GO G191)))
               (SEQ
                (LETT |arr|
                      (VECTOR (QVELT |ba| 0) (QVELT |ba| 1)
                              (+ (QVELT |ba| 2) |bStart|)
                              (+ (QVELT |ba| 3) |bStart|) (QVELT |ba| 4)
                              (QVELT |ba| 5) (QVELT |ba| 6))
                      . #3#)
                (EXIT (LETT |lb| (SPADCALL |lb| |arr| (QREFELT $ 18)) . #3#)))
               (LETT #2# (CDR #2#) . #3#) (GO G190) G191 (EXIT NIL))
          (LETT |la| (SPADCALL (QCDR |a|) |lb| (QREFELT $ 67)) . #3#)
          (EXIT (CONS |lo| |la|))))) 

(SDEFUN |WGRPH;merge;3$;22| ((|a| $) (|b| $) ($ $))
        (SPROG
         ((|la|
           (|List|
            (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                      (|:| |fromOb| (|NonNegativeInteger|))
                      (|:| |toOb| (|NonNegativeInteger|))
                      (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                      (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|lb|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|arr| #1#) (|fromI| #2=(|NonNegativeInteger|)) (|toI| #2#)
          (#3=#:G934 NIL) (|ba| NIL) (|bStart| #4=(|NonNegativeInteger|))
          (|bmap| (|List| (|NonNegativeInteger|))) (#5=#:G922 NIL)
          (|newIndex| #4#)
          (|mergedObjects|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
          (|i| (|Integer|)) (#6=#:G933 NIL) (|bob| NIL) (#7=#:G932 NIL)
          (|x| NIL) (#8=#:G931 NIL))
         (SEQ
          (LETT |bmap|
                (PROGN
                 (LETT #8# NIL . #9=(|WGRPH;merge;3$;22|))
                 (SEQ (LETT |x| 1 . #9#) (LETT #7# (LENGTH (QCAR |a|)) . #9#)
                      G190 (COND ((|greater_SI| |x| #7#) (GO G191)))
                      (SEQ (EXIT (LETT #8# (CONS |x| #8#) . #9#)))
                      (LETT |x| (|inc_SI| |x|) . #9#) (GO G190) G191
                      (EXIT (NREVERSE #8#))))
                . #9#)
          (LETT |newIndex| (LENGTH (QCAR |a|)) . #9#)
          (LETT |mergedObjects| (QCAR |a|) . #9#)
          (SEQ (LETT |bob| NIL . #9#) (LETT #6# (QCAR |b|) . #9#) G190
               (COND
                ((OR (ATOM #6#) (PROGN (LETT |bob| (CAR #6#) . #9#) NIL))
                 (GO G191)))
               (SEQ (LETT |i| (SPADCALL |bob| (QCAR |a|) (QREFELT $ 69)) . #9#)
                    (EXIT
                     (COND
                      ((< |i| 1)
                       (SEQ
                        (LETT |mergedObjects|
                              (SPADCALL |mergedObjects| |bob| (QREFELT $ 19))
                              . #9#)
                        (LETT |newIndex| (+ |newIndex| 1) . #9#)
                        (EXIT
                         (LETT |bmap|
                               (SPADCALL |bmap| |newIndex| (QREFELT $ 70))
                               . #9#))))
                      ('T
                       (LETT |bmap|
                             (SPADCALL |bmap|
                                       (PROG1 (LETT #5# |i| . #9#)
                                         (|check_subtype2| (>= #5# 0)
                                                           '(|NonNegativeInteger|)
                                                           '(|Integer|) #5#))
                                       (QREFELT $ 70))
                             . #9#)))))
               (LETT #6# (CDR #6#) . #9#) (GO G190) G191 (EXIT NIL))
          (LETT |bStart| (LENGTH (QCAR |a|)) . #9#) (LETT |lb| NIL . #9#)
          (SEQ (LETT |ba| NIL . #9#) (LETT #3# (QCDR |b|) . #9#) G190
               (COND
                ((OR (ATOM #3#) (PROGN (LETT |ba| (CAR #3#) . #9#) NIL))
                 (GO G191)))
               (SEQ
                (LETT |toI|
                      (SPADCALL |bmap| (+ (QVELT |ba| 3) |bStart|)
                                (QREFELT $ 45))
                      . #9#)
                (LETT |fromI|
                      (SPADCALL |bmap| (+ (QVELT |ba| 2) |bStart|)
                                (QREFELT $ 45))
                      . #9#)
                (LETT |arr|
                      (VECTOR (QVELT |ba| 0) (QVELT |ba| 1) |fromI| |toI|
                              (QVELT |ba| 4) (QVELT |ba| 5) (QVELT |ba| 6))
                      . #9#)
                (EXIT (LETT |lb| (SPADCALL |lb| |arr| (QREFELT $ 18)) . #9#)))
               (LETT #3# (CDR #3#) . #9#) (GO G190) G191 (EXIT NIL))
          (LETT |la| (SPADCALL (QCDR |a|) |lb| (QREFELT $ 67)) . #9#)
          (EXIT (CONS |mergedObjects| |la|))))) 

(SDEFUN |WGRPH;objProd|
        ((|a| $) (|b| $)
         ($ |List|
          (|Record| (|:| |value| (|Product| S S))
                    (|:| |posX| (|NonNegativeInteger|))
                    (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
        (SPROG
         ((|newObjs|
           (|List|
            (|Record| (|:| |value| (|Product| S S))
                      (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
          (|ob|
           (|Record| (|:| |value| (|Product| S S))
                     (|:| |posX| (|NonNegativeInteger|))
                     (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W)))
          (|sp| (|Product| S S)) (|heighta| (|NonNegativeInteger|))
          (|widtha| (|NonNegativeInteger|)) (|y| #1=(|NonNegativeInteger|))
          (|x| #1#) (|byi| #2=(|NonNegativeInteger|))
          (|bxi| #3=(|NonNegativeInteger|)) (|bi| (S)) (#4=#:G946 NIL)
          (|boi| NIL) (|ayi| #2#) (|axi| #3#) (|ai| (S)) (#5=#:G945 NIL)
          (|aoi| NIL))
         (SEQ (LETT |newObjs| NIL . #6=(|WGRPH;objProd|))
              (SEQ (LETT |aoi| NIL . #6#) (LETT #5# (QCAR |a|) . #6#) G190
                   (COND
                    ((OR (ATOM #5#) (PROGN (LETT |aoi| (CAR #5#) . #6#) NIL))
                     (GO G191)))
                   (SEQ (LETT |ai| (QVELT |aoi| 0) . #6#)
                        (LETT |axi| (QVELT |aoi| 1) . #6#)
                        (LETT |ayi| (QVELT |aoi| 2) . #6#)
                        (EXIT
                         (SEQ (LETT |boi| NIL . #6#)
                              (LETT #4# (QCAR |b|) . #6#) G190
                              (COND
                               ((OR (ATOM #4#)
                                    (PROGN (LETT |boi| (CAR #4#) . #6#) NIL))
                                (GO G191)))
                              (SEQ (LETT |bi| (QVELT |boi| 0) . #6#)
                                   (LETT |bxi| (QVELT |boi| 1) . #6#)
                                   (LETT |byi| (QVELT |boi| 2) . #6#)
                                   (LETT |x|
                                         (+
                                          (* |bxi|
                                             (SPADCALL |a| (QREFELT $ 72)))
                                          |axi|)
                                         . #6#)
                                   (LETT |y|
                                         (+
                                          (* |byi|
                                             (SPADCALL |a| (QREFELT $ 73)))
                                          |ayi|)
                                         . #6#)
                                   (LETT |widtha| (SPADCALL |a| (QREFELT $ 72))
                                         . #6#)
                                   (LETT |heighta|
                                         (SPADCALL |a| (QREFELT $ 73)) . #6#)
                                   (LETT |sp|
                                         (SPADCALL |ai| |bi| (QREFELT $ 75))
                                         . #6#)
                                   (LETT |ob|
                                         (VECTOR |sp| |x| |y|
                                                 (|spadConstant| $ 9))
                                         . #6#)
                                   (EXIT
                                    (LETT |newObjs|
                                          (SPADCALL |newObjs| |ob|
                                                    (QREFELT $ 78))
                                          . #6#)))
                              (LETT #4# (CDR #4#) . #6#) (GO G190) G191
                              (EXIT NIL))))
                   (LETT #5# (CDR #5#) . #6#) (GO G190) G191 (EXIT NIL))
              (EXIT |newObjs|)))) 

(SDEFUN |WGRPH;indexProd|
        ((|aObj| $) (|a| |NonNegativeInteger|) (|b| |NonNegativeInteger|)
         ($ |NonNegativeInteger|))
        (SPROG ((#1=#:G947 NIL))
               (+ |a|
                  (*
                   (PROG1 (LETT #1# (- |b| 1) |WGRPH;indexProd|)
                     (|check_subtype2| (>= #1# 0) '(|NonNegativeInteger|)
                                       '(|Integer|) #1#))
                   (LENGTH (QCAR |aObj|)))))) 

(SDEFUN |WGRPH;*;2$Wg;25|
        ((|a| $) (|b| $) ($ |WeightedGraph| (|Product| S S) W))
        (SPROG
         ((|newArrs|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|arr| #1#) (|an| (|String|)) (#2=#:G971 NIL) (|bv| NIL)
          (#3=#:G970 NIL) (|bu| NIL) (#4=#:G969 NIL) (|av| NIL) (#5=#:G968 NIL)
          (|au| NIL))
         (SEQ (LETT |newArrs| NIL . #6=(|WGRPH;*;2$Wg;25|))
              (SEQ (LETT |au| 1 . #6#) (LETT #5# (LENGTH (QCAR |a|)) . #6#)
                   G190 (COND ((|greater_SI| |au| #5#) (GO G191)))
                   (SEQ
                    (EXIT
                     (SEQ (LETT |av| 1 . #6#)
                          (LETT #4# (LENGTH (QCAR |a|)) . #6#) G190
                          (COND ((|greater_SI| |av| #4#) (GO G191)))
                          (SEQ
                           (EXIT
                            (SEQ (LETT |bu| 1 . #6#)
                                 (LETT #3# (LENGTH (QCAR |b|)) . #6#) G190
                                 (COND ((|greater_SI| |bu| #3#) (GO G191)))
                                 (SEQ
                                  (EXIT
                                   (SEQ (LETT |bv| 1 . #6#)
                                        (LETT #2# (LENGTH (QCAR |b|)) . #6#)
                                        G190
                                        (COND
                                         ((|greater_SI| |bv| #2#) (GO G191)))
                                        (SEQ
                                         (EXIT
                                          (COND
                                           ((SPADCALL |a| |au| |av|
                                                      (QREFELT $ 79))
                                            (COND
                                             ((SPADCALL |b| |bu| |bv|
                                                        (QREFELT $ 79))
                                              (SEQ
                                               (LETT |an|
                                                     (SPADCALL
                                                      (LIST
                                                       (SPADCALL |a| |au| |av|
                                                                 (QREFELT $
                                                                          80))
                                                       "*"
                                                       (SPADCALL |b| |bu| |bv|
                                                                 (QREFELT $
                                                                          80)))
                                                      (QREFELT $ 82))
                                                     . #6#)
                                               (LETT |arr|
                                                     (VECTOR |an|
                                                             (|spadConstant| $
                                                                             9)
                                                             (|WGRPH;indexProd|
                                                              |b| |bu| |au| $)
                                                             (|WGRPH;indexProd|
                                                              |b| |bv| |av| $)
                                                             0 0 NIL)
                                                     . #6#)
                                               (EXIT
                                                (LETT |newArrs|
                                                      (SPADCALL |newArrs| |arr|
                                                                (QREFELT $ 18))
                                                      . #6#)))))))))
                                        (LETT |bv| (|inc_SI| |bv|) . #6#)
                                        (GO G190) G191 (EXIT NIL))))
                                 (LETT |bu| (|inc_SI| |bu|) . #6#) (GO G190)
                                 G191 (EXIT NIL))))
                          (LETT |av| (|inc_SI| |av|) . #6#) (GO G190) G191
                          (EXIT NIL))))
                   (LETT |au| (|inc_SI| |au|) . #6#) (GO G190) G191 (EXIT NIL))
              (EXIT
               (SPADCALL (|WGRPH;objProd| |a| |b| $) |newArrs|
                         (QREFELT $ 84)))))) 

(SDEFUN |WGRPH;cartesian;2$Wg;26|
        ((|a| $) (|b| $) ($ |WeightedGraph| (|Product| S S) W))
        (SPROG
         ((|newArrs|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|arr| #1#) (|an| (|String|)) (#2=#:G996 NIL) (|bv| NIL)
          (#3=#:G995 NIL) (|bu| NIL) (#4=#:G994 NIL) (|av| NIL) (#5=#:G993 NIL)
          (|au| NIL))
         (SEQ (LETT |newArrs| NIL . #6=(|WGRPH;cartesian;2$Wg;26|))
              (SEQ (LETT |au| 1 . #6#) (LETT #5# (LENGTH (QCAR |a|)) . #6#)
                   G190 (COND ((|greater_SI| |au| #5#) (GO G191)))
                   (SEQ
                    (EXIT
                     (SEQ (LETT |av| 1 . #6#)
                          (LETT #4# (LENGTH (QCAR |a|)) . #6#) G190
                          (COND ((|greater_SI| |av| #4#) (GO G191)))
                          (SEQ
                           (EXIT
                            (SEQ (LETT |bu| 1 . #6#)
                                 (LETT #3# (LENGTH (QCAR |b|)) . #6#) G190
                                 (COND ((|greater_SI| |bu| #3#) (GO G191)))
                                 (SEQ
                                  (EXIT
                                   (SEQ (LETT |bv| 1 . #6#)
                                        (LETT #2# (LENGTH (QCAR |b|)) . #6#)
                                        G190
                                        (COND
                                         ((|greater_SI| |bv| #2#) (GO G191)))
                                        (SEQ
                                         (EXIT
                                          (COND
                                           ((EQL |bu| |bv|)
                                            (COND
                                             ((SPADCALL |a| |au| |av|
                                                        (QREFELT $ 79))
                                              (SEQ
                                               (LETT |an|
                                                     (COND
                                                      ((EQL |bu| |bv|)
                                                       (COND
                                                        ((SPADCALL |a| |au|
                                                                   |av|
                                                                   (QREFELT $
                                                                            79))
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |a| |au|
                                                                     |av|
                                                                     (QREFELT $
                                                                              80))
                                                           #7="#"
                                                           (STRINGIMAGE |bv|))
                                                          (QREFELT $ 82)))
                                                        ('T
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |b| |bu|
                                                                     |bv|
                                                                     (QREFELT $
                                                                              80))
                                                           #8="#"
                                                           (STRINGIMAGE |av|))
                                                          (QREFELT $ 82)))))
                                                      ('T
                                                       (SPADCALL
                                                        (LIST
                                                         (SPADCALL |b| |bu|
                                                                   |bv|
                                                                   (QREFELT $
                                                                            80))
                                                         #8#
                                                         (STRINGIMAGE |av|))
                                                        (QREFELT $ 82))))
                                                     . #6#)
                                               (LETT |arr|
                                                     (VECTOR |an|
                                                             (|spadConstant| $
                                                                             9)
                                                             (|WGRPH;indexProd|
                                                              |b| |bu| |au| $)
                                                             (|WGRPH;indexProd|
                                                              |b| |bv| |av| $)
                                                             0 0 NIL)
                                                     . #6#)
                                               (EXIT
                                                (LETT |newArrs|
                                                      (SPADCALL |newArrs| |arr|
                                                                (QREFELT $ 18))
                                                      . #6#))))
                                             ((EQL |au| |av|)
                                              (COND
                                               ((SPADCALL |b| |bu| |bv|
                                                          (QREFELT $ 79))
                                                (SEQ
                                                 (LETT |an|
                                                       (COND
                                                        ((EQL |bu| |bv|)
                                                         (COND
                                                          ((SPADCALL |a| |au|
                                                                     |av|
                                                                     (QREFELT $
                                                                              79))
                                                           (SPADCALL
                                                            (LIST
                                                             (SPADCALL |a| |au|
                                                                       |av|
                                                                       (QREFELT
                                                                        $ 80))
                                                             #7#
                                                             (STRINGIMAGE
                                                              |bv|))
                                                            (QREFELT $ 82)))
                                                          ('T
                                                           (SPADCALL
                                                            (LIST
                                                             (SPADCALL |b| |bu|
                                                                       |bv|
                                                                       (QREFELT
                                                                        $ 80))
                                                             #8#
                                                             (STRINGIMAGE
                                                              |av|))
                                                            (QREFELT $ 82)))))
                                                        ('T
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |b| |bu|
                                                                     |bv|
                                                                     (QREFELT $
                                                                              80))
                                                           #8#
                                                           (STRINGIMAGE |av|))
                                                          (QREFELT $ 82))))
                                                       . #6#)
                                                 (LETT |arr|
                                                       (VECTOR |an|
                                                               (|spadConstant|
                                                                $ 9)
                                                               (|WGRPH;indexProd|
                                                                |b| |bu| |au|
                                                                $)
                                                               (|WGRPH;indexProd|
                                                                |b| |bv| |av|
                                                                $)
                                                               0 0 NIL)
                                                       . #6#)
                                                 (EXIT
                                                  (LETT |newArrs|
                                                        (SPADCALL |newArrs|
                                                                  |arr|
                                                                  (QREFELT $
                                                                           18))
                                                        . #6#))))))))
                                           ((EQL |au| |av|)
                                            (COND
                                             ((SPADCALL |b| |bu| |bv|
                                                        (QREFELT $ 79))
                                              (SEQ
                                               (LETT |an|
                                                     (COND
                                                      ((EQL |bu| |bv|)
                                                       (COND
                                                        ((SPADCALL |a| |au|
                                                                   |av|
                                                                   (QREFELT $
                                                                            79))
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |a| |au|
                                                                     |av|
                                                                     (QREFELT $
                                                                              80))
                                                           #7#
                                                           (STRINGIMAGE |bv|))
                                                          (QREFELT $ 82)))
                                                        ('T
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |b| |bu|
                                                                     |bv|
                                                                     (QREFELT $
                                                                              80))
                                                           #8#
                                                           (STRINGIMAGE |av|))
                                                          (QREFELT $ 82)))))
                                                      ('T
                                                       (SPADCALL
                                                        (LIST
                                                         (SPADCALL |b| |bu|
                                                                   |bv|
                                                                   (QREFELT $
                                                                            80))
                                                         #8#
                                                         (STRINGIMAGE |av|))
                                                        (QREFELT $ 82))))
                                                     . #6#)
                                               (LETT |arr|
                                                     (VECTOR |an|
                                                             (|spadConstant| $
                                                                             9)
                                                             (|WGRPH;indexProd|
                                                              |b| |bu| |au| $)
                                                             (|WGRPH;indexProd|
                                                              |b| |bv| |av| $)
                                                             0 0 NIL)
                                                     . #6#)
                                               (EXIT
                                                (LETT |newArrs|
                                                      (SPADCALL |newArrs| |arr|
                                                                (QREFELT $ 18))
                                                      . #6#)))))))))
                                        (LETT |bv| (|inc_SI| |bv|) . #6#)
                                        (GO G190) G191 (EXIT NIL))))
                                 (LETT |bu| (|inc_SI| |bu|) . #6#) (GO G190)
                                 G191 (EXIT NIL))))
                          (LETT |av| (|inc_SI| |av|) . #6#) (GO G190) G191
                          (EXIT NIL))))
                   (LETT |au| (|inc_SI| |au|) . #6#) (GO G190) G191 (EXIT NIL))
              (EXIT
               (SPADCALL (|WGRPH;objProd| |a| |b| $) |newArrs|
                         (QREFELT $ 84)))))) 

(SDEFUN |WGRPH;closedObjProd|
        ((|a| $) (|b| $) (|f| |Mapping| S S S)
         ($ |List|
          (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                    (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
        (SPROG
         ((|newObjs|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
          (|ob|
           (|Record| (|:| |value| S) (|:| |posX| #1=(|NonNegativeInteger|))
                     (|:| |posY| #2=(|NonNegativeInteger|)) (|:| |weight| W)))
          (|sp| (S)) (|heighta| (|NonNegativeInteger|))
          (|widtha| (|NonNegativeInteger|)) (|y| #3=(|NonNegativeInteger|))
          (|x| #3#) (|byi| #2#) (|bxi| #1#) (|bi| (S)) (#4=#:G1005 NIL)
          (|boi| NIL) (|ayi| #2#) (|axi| #1#) (|ai| (S)) (#5=#:G1004 NIL)
          (|aoi| NIL))
         (SEQ (LETT |newObjs| NIL . #6=(|WGRPH;closedObjProd|))
              (SEQ (LETT |aoi| NIL . #6#) (LETT #5# (QCAR |a|) . #6#) G190
                   (COND
                    ((OR (ATOM #5#) (PROGN (LETT |aoi| (CAR #5#) . #6#) NIL))
                     (GO G191)))
                   (SEQ (LETT |ai| (QVELT |aoi| 0) . #6#)
                        (LETT |axi| (QVELT |aoi| 1) . #6#)
                        (LETT |ayi| (QVELT |aoi| 2) . #6#)
                        (EXIT
                         (SEQ (LETT |boi| NIL . #6#)
                              (LETT #4# (QCAR |b|) . #6#) G190
                              (COND
                               ((OR (ATOM #4#)
                                    (PROGN (LETT |boi| (CAR #4#) . #6#) NIL))
                                (GO G191)))
                              (SEQ (LETT |bi| (QVELT |boi| 0) . #6#)
                                   (LETT |bxi| (QVELT |boi| 1) . #6#)
                                   (LETT |byi| (QVELT |boi| 2) . #6#)
                                   (LETT |x|
                                         (+
                                          (* |bxi|
                                             (SPADCALL |a| (QREFELT $ 72)))
                                          |axi|)
                                         . #6#)
                                   (LETT |y|
                                         (+
                                          (* |byi|
                                             (SPADCALL |a| (QREFELT $ 73)))
                                          |ayi|)
                                         . #6#)
                                   (LETT |widtha| (SPADCALL |a| (QREFELT $ 72))
                                         . #6#)
                                   (LETT |heighta|
                                         (SPADCALL |a| (QREFELT $ 73)) . #6#)
                                   (LETT |sp| (SPADCALL |ai| |bi| |f|) . #6#)
                                   (LETT |ob|
                                         (VECTOR |sp| |x| |y|
                                                 (|spadConstant| $ 9))
                                         . #6#)
                                   (EXIT
                                    (LETT |newObjs|
                                          (SPADCALL |newObjs| |ob|
                                                    (QREFELT $ 19))
                                          . #6#)))
                              (LETT #4# (CDR #4#) . #6#) (GO G190) G191
                              (EXIT NIL))))
                   (LETT #5# (CDR #5#) . #6#) (GO G190) G191 (EXIT NIL))
              (EXIT |newObjs|)))) 

(SDEFUN |WGRPH;closedTensor;2$M$;28|
        ((|a| $) (|b| $) (|f| |Mapping| S S S) ($ $))
        (SPROG
         ((|newArrs|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|arr| #1#) (|an| (|String|)) (#2=#:G1026 NIL) (|bv| NIL)
          (#3=#:G1025 NIL) (|bu| NIL) (#4=#:G1024 NIL) (|av| NIL)
          (#5=#:G1023 NIL) (|au| NIL))
         (SEQ (LETT |newArrs| NIL . #6=(|WGRPH;closedTensor;2$M$;28|))
              (SEQ (LETT |au| 1 . #6#) (LETT #5# (LENGTH (QCAR |a|)) . #6#)
                   G190 (COND ((|greater_SI| |au| #5#) (GO G191)))
                   (SEQ
                    (EXIT
                     (SEQ (LETT |av| 1 . #6#)
                          (LETT #4# (LENGTH (QCAR |a|)) . #6#) G190
                          (COND ((|greater_SI| |av| #4#) (GO G191)))
                          (SEQ
                           (EXIT
                            (SEQ (LETT |bu| 1 . #6#)
                                 (LETT #3# (LENGTH (QCAR |b|)) . #6#) G190
                                 (COND ((|greater_SI| |bu| #3#) (GO G191)))
                                 (SEQ
                                  (EXIT
                                   (SEQ (LETT |bv| 1 . #6#)
                                        (LETT #2# (LENGTH (QCAR |b|)) . #6#)
                                        G190
                                        (COND
                                         ((|greater_SI| |bv| #2#) (GO G191)))
                                        (SEQ
                                         (EXIT
                                          (COND
                                           ((SPADCALL |a| |au| |av|
                                                      (QREFELT $ 79))
                                            (COND
                                             ((SPADCALL |b| |bu| |bv|
                                                        (QREFELT $ 79))
                                              (SEQ
                                               (LETT |an|
                                                     (SPADCALL
                                                      (LIST
                                                       (SPADCALL |a| |au| |av|
                                                                 (QREFELT $
                                                                          80))
                                                       "*"
                                                       (SPADCALL |b| |bu| |bv|
                                                                 (QREFELT $
                                                                          80)))
                                                      (QREFELT $ 82))
                                                     . #6#)
                                               (LETT |arr|
                                                     (VECTOR |an|
                                                             (|spadConstant| $
                                                                             9)
                                                             (|WGRPH;indexProd|
                                                              |b| |bu| |au| $)
                                                             (|WGRPH;indexProd|
                                                              |b| |bv| |av| $)
                                                             0 0 NIL)
                                                     . #6#)
                                               (EXIT
                                                (LETT |newArrs|
                                                      (SPADCALL |newArrs| |arr|
                                                                (QREFELT $ 18))
                                                      . #6#)))))))))
                                        (LETT |bv| (|inc_SI| |bv|) . #6#)
                                        (GO G190) G191 (EXIT NIL))))
                                 (LETT |bu| (|inc_SI| |bu|) . #6#) (GO G190)
                                 G191 (EXIT NIL))))
                          (LETT |av| (|inc_SI| |av|) . #6#) (GO G190) G191
                          (EXIT NIL))))
                   (LETT |au| (|inc_SI| |au|) . #6#) (GO G190) G191 (EXIT NIL))
              (EXIT
               (SPADCALL (|WGRPH;closedObjProd| |a| |b| |f| $) |newArrs|
                         (QREFELT $ 17)))))) 

(SDEFUN |WGRPH;closedCartesian;2$M$;29|
        ((|a| $) (|b| $) (|f| |Mapping| S S S) ($ $))
        (SPROG
         ((|newArrs|
           (|List|
            #1=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|arr| #1#) (|an| (|String|)) (#2=#:G1052 NIL) (|bv| NIL)
          (#3=#:G1051 NIL) (|bu| NIL) (#4=#:G1050 NIL) (|av| NIL)
          (#5=#:G1049 NIL) (|au| NIL))
         (SEQ (LETT |newArrs| NIL . #6=(|WGRPH;closedCartesian;2$M$;29|))
              (SEQ (LETT |au| 1 . #6#) (LETT #5# (LENGTH (QCAR |a|)) . #6#)
                   G190 (COND ((|greater_SI| |au| #5#) (GO G191)))
                   (SEQ
                    (EXIT
                     (SEQ (LETT |av| 1 . #6#)
                          (LETT #4# (LENGTH (QCAR |a|)) . #6#) G190
                          (COND ((|greater_SI| |av| #4#) (GO G191)))
                          (SEQ
                           (EXIT
                            (SEQ (LETT |bu| 1 . #6#)
                                 (LETT #3# (LENGTH (QCAR |b|)) . #6#) G190
                                 (COND ((|greater_SI| |bu| #3#) (GO G191)))
                                 (SEQ
                                  (EXIT
                                   (SEQ (LETT |bv| 1 . #6#)
                                        (LETT #2# (LENGTH (QCAR |b|)) . #6#)
                                        G190
                                        (COND
                                         ((|greater_SI| |bv| #2#) (GO G191)))
                                        (SEQ
                                         (EXIT
                                          (COND
                                           ((EQL |bu| |bv|)
                                            (COND
                                             ((SPADCALL |a| |au| |av|
                                                        (QREFELT $ 79))
                                              (SEQ
                                               (LETT |an|
                                                     (COND
                                                      ((EQL |bu| |bv|)
                                                       (COND
                                                        ((SPADCALL |a| |au|
                                                                   |av|
                                                                   (QREFELT $
                                                                            79))
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |a| |au|
                                                                     |av|
                                                                     (QREFELT $
                                                                              80))
                                                           #7="#"
                                                           (STRINGIMAGE |bv|))
                                                          (QREFELT $ 82)))
                                                        ('T
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |b| |bu|
                                                                     |bv|
                                                                     (QREFELT $
                                                                              80))
                                                           #8="#"
                                                           (STRINGIMAGE |av|))
                                                          (QREFELT $ 82)))))
                                                      ('T
                                                       (SPADCALL
                                                        (LIST
                                                         (SPADCALL |b| |bu|
                                                                   |bv|
                                                                   (QREFELT $
                                                                            80))
                                                         #8#
                                                         (STRINGIMAGE |av|))
                                                        (QREFELT $ 82))))
                                                     . #6#)
                                               (LETT |arr|
                                                     (VECTOR |an|
                                                             (|spadConstant| $
                                                                             9)
                                                             (|WGRPH;indexProd|
                                                              |b| |bu| |au| $)
                                                             (|WGRPH;indexProd|
                                                              |b| |bv| |av| $)
                                                             0 0 NIL)
                                                     . #6#)
                                               (EXIT
                                                (LETT |newArrs|
                                                      (SPADCALL |newArrs| |arr|
                                                                (QREFELT $ 18))
                                                      . #6#))))
                                             ((EQL |au| |av|)
                                              (COND
                                               ((SPADCALL |b| |bu| |bv|
                                                          (QREFELT $ 79))
                                                (SEQ
                                                 (LETT |an|
                                                       (COND
                                                        ((EQL |bu| |bv|)
                                                         (COND
                                                          ((SPADCALL |a| |au|
                                                                     |av|
                                                                     (QREFELT $
                                                                              79))
                                                           (SPADCALL
                                                            (LIST
                                                             (SPADCALL |a| |au|
                                                                       |av|
                                                                       (QREFELT
                                                                        $ 80))
                                                             #7#
                                                             (STRINGIMAGE
                                                              |bv|))
                                                            (QREFELT $ 82)))
                                                          ('T
                                                           (SPADCALL
                                                            (LIST
                                                             (SPADCALL |b| |bu|
                                                                       |bv|
                                                                       (QREFELT
                                                                        $ 80))
                                                             #8#
                                                             (STRINGIMAGE
                                                              |av|))
                                                            (QREFELT $ 82)))))
                                                        ('T
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |b| |bu|
                                                                     |bv|
                                                                     (QREFELT $
                                                                              80))
                                                           #8#
                                                           (STRINGIMAGE |av|))
                                                          (QREFELT $ 82))))
                                                       . #6#)
                                                 (LETT |arr|
                                                       (VECTOR |an|
                                                               (|spadConstant|
                                                                $ 9)
                                                               (|WGRPH;indexProd|
                                                                |b| |bu| |au|
                                                                $)
                                                               (|WGRPH;indexProd|
                                                                |b| |bv| |av|
                                                                $)
                                                               0 0 NIL)
                                                       . #6#)
                                                 (EXIT
                                                  (LETT |newArrs|
                                                        (SPADCALL |newArrs|
                                                                  |arr|
                                                                  (QREFELT $
                                                                           18))
                                                        . #6#))))))))
                                           ((EQL |au| |av|)
                                            (COND
                                             ((SPADCALL |b| |bu| |bv|
                                                        (QREFELT $ 79))
                                              (SEQ
                                               (LETT |an|
                                                     (COND
                                                      ((EQL |bu| |bv|)
                                                       (COND
                                                        ((SPADCALL |a| |au|
                                                                   |av|
                                                                   (QREFELT $
                                                                            79))
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |a| |au|
                                                                     |av|
                                                                     (QREFELT $
                                                                              80))
                                                           #7#
                                                           (STRINGIMAGE |bv|))
                                                          (QREFELT $ 82)))
                                                        ('T
                                                         (SPADCALL
                                                          (LIST
                                                           (SPADCALL |b| |bu|
                                                                     |bv|
                                                                     (QREFELT $
                                                                              80))
                                                           #8#
                                                           (STRINGIMAGE |av|))
                                                          (QREFELT $ 82)))))
                                                      ('T
                                                       (SPADCALL
                                                        (LIST
                                                         (SPADCALL |b| |bu|
                                                                   |bv|
                                                                   (QREFELT $
                                                                            80))
                                                         #8#
                                                         (STRINGIMAGE |av|))
                                                        (QREFELT $ 82))))
                                                     . #6#)
                                               (LETT |arr|
                                                     (VECTOR |an|
                                                             (|spadConstant| $
                                                                             9)
                                                             (|WGRPH;indexProd|
                                                              |b| |bu| |au| $)
                                                             (|WGRPH;indexProd|
                                                              |b| |bv| |av| $)
                                                             0 0 NIL)
                                                     . #6#)
                                               (EXIT
                                                (LETT |newArrs|
                                                      (SPADCALL |newArrs| |arr|
                                                                (QREFELT $ 18))
                                                      . #6#)))))))))
                                        (LETT |bv| (|inc_SI| |bv|) . #6#)
                                        (GO G190) G191 (EXIT NIL))))
                                 (LETT |bu| (|inc_SI| |bu|) . #6#) (GO G190)
                                 G191 (EXIT NIL))))
                          (LETT |av| (|inc_SI| |av|) . #6#) (GO G190) G191
                          (EXIT NIL))))
                   (LETT |au| (|inc_SI| |au|) . #6#) (GO G190) G191 (EXIT NIL))
              (EXIT
               (SPADCALL (|WGRPH;closedObjProd| |a| |b| |f| $) |newArrs|
                         (QREFELT $ 17)))))) 

(SDEFUN |WGRPH;map;$LL2I$;30|
        ((|s| $) (|m| |List| (|NonNegativeInteger|)) (|newOb| |List| S)
         (|offsetX| . #1=(|Integer|)) (|offsetY| . #1#) ($ $))
        (SPROG
         ((|newArrs|
           (|List|
            #2=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|newArr| #2#) (#3=#:G1069 NIL) (|oldArrow| NIL) (#4=#:G1057 NIL)
          (#5=#:G1056 NIL) (|i| (|NonNegativeInteger|)) (#6=#:G1068 NIL)
          (|oi| NIL)
          (|newObjs|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
          (#7=#:G1067 NIL) (|o| NIL) (#8=#:G1066 NIL))
         (SEQ
          (LETT |newObjs|
                (PROGN
                 (LETT #8# NIL . #9=(|WGRPH;map;$LL2I$;30|))
                 (SEQ (LETT |o| NIL . #9#) (LETT #7# |newOb| . #9#) G190
                      (COND
                       ((OR (ATOM #7#) (PROGN (LETT |o| (CAR #7#) . #9#) NIL))
                        (GO G191)))
                      (SEQ
                       (EXIT
                        (LETT #8#
                              (CONS (VECTOR |o| 0 0 (|spadConstant| $ 9)) #8#)
                              . #9#)))
                      (LETT #7# (CDR #7#) . #9#) (GO G190) G191
                      (EXIT (NREVERSE #8#))))
                . #9#)
          (SEQ (LETT |oi| 1 . #9#) (LETT #6# (LENGTH (QCAR |s|)) . #9#) G190
               (COND ((|greater_SI| |oi| #6#) (GO G191)))
               (SEQ (LETT |i| (SPADCALL |m| |oi| (QREFELT $ 45)) . #9#)
                    (EXIT
                     (SPADCALL |newObjs| |i|
                               (VECTOR
                                (QVELT (SPADCALL |newObjs| |i| (QREFELT $ 90))
                                       0)
                                (PROG1
                                    (LETT #5#
                                          (+
                                           (QVELT
                                            (SPADCALL (QCAR |s|) |oi|
                                                      (QREFELT $ 90))
                                            1)
                                           |offsetX|)
                                          . #9#)
                                  (|check_subtype2| (>= #5# 0)
                                                    '(|NonNegativeInteger|)
                                                    '(|Integer|) #5#))
                                (PROG1
                                    (LETT #4#
                                          (+
                                           (QVELT
                                            (SPADCALL (QCAR |s|) |oi|
                                                      (QREFELT $ 90))
                                            2)
                                           |offsetY|)
                                          . #9#)
                                  (|check_subtype2| (>= #4# 0)
                                                    '(|NonNegativeInteger|)
                                                    '(|Integer|) #4#))
                                (|spadConstant| $ 9))
                               (QREFELT $ 91))))
               (LETT |oi| (|inc_SI| |oi|) . #9#) (GO G190) G191 (EXIT NIL))
          (LETT |newArrs| NIL . #9#)
          (SEQ (LETT |oldArrow| NIL . #9#) (LETT #3# (QCDR |s|) . #9#) G190
               (COND
                ((OR (ATOM #3#) (PROGN (LETT |oldArrow| (CAR #3#) . #9#) NIL))
                 (GO G191)))
               (SEQ
                (LETT |newArr|
                      (VECTOR (QVELT |oldArrow| 0) (QVELT |oldArrow| 1)
                              (SPADCALL |m| (QVELT |oldArrow| 2)
                                        (QREFELT $ 45))
                              (SPADCALL |m| (QVELT |oldArrow| 3)
                                        (QREFELT $ 45))
                              (QVELT |oldArrow| 4) (QVELT |oldArrow| 5)
                              (QVELT |oldArrow| 6))
                      . #9#)
                (EXIT
                 (LETT |newArrs| (SPADCALL |newArrs| |newArr| (QREFELT $ 18))
                       . #9#)))
               (LETT #3# (CDR #3#) . #9#) (GO G190) G191 (EXIT NIL))
          (EXIT (CONS |newObjs| |newArrs|))))) 

(SDEFUN |WGRPH;mapContra;$LL2I$;31|
        ((|s| $) (|m| |List| (|NonNegativeInteger|)) (|newOb| |List| S)
         (|offsetX| . #1=(|Integer|)) (|offsetY| . #1#) ($ $))
        (SPROG
         ((|newArrs|
           (|List|
            #2=(|Record| (|:| |name| (|String|)) (|:| |weight| W)
                         (|:| |fromOb| (|NonNegativeInteger|))
                         (|:| |toOb| (|NonNegativeInteger|))
                         (|:| |xOffset| (|Integer|))
                         (|:| |yOffset| (|Integer|))
                         (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|newArr| #2#) (#3=#:G1086 NIL) (|oldArrow| NIL) (#4=#:G1074 NIL)
          (#5=#:G1073 NIL) (|i| (|NonNegativeInteger|)) (#6=#:G1085 NIL)
          (|oi| NIL)
          (|newObjs|
           (|List|
            (|Record| (|:| |value| S) (|:| |posX| (|NonNegativeInteger|))
                      (|:| |posY| (|NonNegativeInteger|)) (|:| |weight| W))))
          (#7=#:G1084 NIL) (|o| NIL) (#8=#:G1083 NIL))
         (SEQ
          (LETT |newObjs|
                (PROGN
                 (LETT #8# NIL . #9=(|WGRPH;mapContra;$LL2I$;31|))
                 (SEQ (LETT |o| NIL . #9#) (LETT #7# |newOb| . #9#) G190
                      (COND
                       ((OR (ATOM #7#) (PROGN (LETT |o| (CAR #7#) . #9#) NIL))
                        (GO G191)))
                      (SEQ
                       (EXIT
                        (LETT #8#
                              (CONS (VECTOR |o| 0 0 (|spadConstant| $ 9)) #8#)
                              . #9#)))
                      (LETT #7# (CDR #7#) . #9#) (GO G190) G191
                      (EXIT (NREVERSE #8#))))
                . #9#)
          (SEQ (LETT |oi| 1 . #9#) (LETT #6# (LENGTH (QCAR |s|)) . #9#) G190
               (COND ((|greater_SI| |oi| #6#) (GO G191)))
               (SEQ (LETT |i| (SPADCALL |m| |oi| (QREFELT $ 45)) . #9#)
                    (EXIT
                     (SPADCALL |newObjs| |i|
                               (VECTOR
                                (QVELT (SPADCALL |newObjs| |i| (QREFELT $ 90))
                                       0)
                                (PROG1
                                    (LETT #5#
                                          (+
                                           (QVELT
                                            (SPADCALL (QCAR |s|) |oi|
                                                      (QREFELT $ 90))
                                            1)
                                           |offsetX|)
                                          . #9#)
                                  (|check_subtype2| (>= #5# 0)
                                                    '(|NonNegativeInteger|)
                                                    '(|Integer|) #5#))
                                (PROG1
                                    (LETT #4#
                                          (+
                                           (QVELT
                                            (SPADCALL (QCAR |s|) |oi|
                                                      (QREFELT $ 90))
                                            2)
                                           |offsetY|)
                                          . #9#)
                                  (|check_subtype2| (>= #4# 0)
                                                    '(|NonNegativeInteger|)
                                                    '(|Integer|) #4#))
                                (|spadConstant| $ 9))
                               (QREFELT $ 91))))
               (LETT |oi| (|inc_SI| |oi|) . #9#) (GO G190) G191 (EXIT NIL))
          (LETT |newArrs| NIL . #9#)
          (SEQ (LETT |oldArrow| NIL . #9#) (LETT #3# (QCDR |s|) . #9#) G190
               (COND
                ((OR (ATOM #3#) (PROGN (LETT |oldArrow| (CAR #3#) . #9#) NIL))
                 (GO G191)))
               (SEQ
                (LETT |newArr|
                      (VECTOR (QVELT |oldArrow| 0) (QVELT |oldArrow| 1)
                              (SPADCALL |m| (QVELT |oldArrow| 3)
                                        (QREFELT $ 45))
                              (SPADCALL |m| (QVELT |oldArrow| 2)
                                        (QREFELT $ 45))
                              (QVELT |oldArrow| 4) (QVELT |oldArrow| 5)
                              (QVELT |oldArrow| 6))
                      . #9#)
                (EXIT
                 (LETT |newArrs| (SPADCALL |newArrs| |newArr| (QREFELT $ 18))
                       . #9#)))
               (LETT #3# (CDR #3#) . #9#) (GO G190) G191 (EXIT NIL))
          (EXIT (CONS |newObjs| |newArrs|))))) 

(SDEFUN |WGRPH;routeNodeRecursive|
        ((|s| $) (|a| |NonNegativeInteger|) (|b| |NonNegativeInteger|)
         (|visited| |List| (|NonNegativeInteger|))
         ($ . #1=(|List| (|NonNegativeInteger|))))
        (SPROG
         ((#2=#:G1099 NIL) (|shortest| (|List| (|NonNegativeInteger|)))
          (|d| #1#) (#3=#:G1100 NIL) (|arr| NIL))
         (SEQ
          (EXIT
           (SEQ
            (COND
             ((SPADCALL (SPADCALL |visited| (QREFELT $ 44))
                        (LENGTH (SPADCALL |s| (QREFELT $ 56))) (QREFELT $ 94))
              (PROGN
               (LETT #2# NIL . #4=(|WGRPH;routeNodeRecursive|))
               (GO #5=#:G1098))))
            (LETT |shortest| NIL . #4#)
            (COND ((EQL |a| |b|) (PROGN (LETT #2# (LIST |a|) . #4#) (GO #5#))))
            (COND
             ((SPADCALL |s| |a| |b| (QREFELT $ 79))
              (PROGN (LETT #2# (LIST |a| |b|) . #4#) (GO #5#))))
            (SEQ (LETT |arr| NIL . #4#)
                 (LETT #3# (SPADCALL |s| (QREFELT $ 57)) . #4#) G190
                 (COND
                  ((OR (ATOM #3#) (PROGN (LETT |arr| (CAR #3#) . #4#) NIL))
                   (GO G191)))
                 (SEQ
                  (EXIT
                   (COND
                    ((SPADCALL |s| |a| (QVELT |arr| 2) (QREFELT $ 79))
                     (SEQ
                      (LETT |d|
                            (|WGRPH;routeNodeRecursive| |s| (QVELT |arr| 2) |b|
                             (SPADCALL |visited| |a| (QREFELT $ 70)) $)
                            . #4#)
                      (EXIT
                       (COND
                        ((SPADCALL |shortest| NIL (QREFELT $ 95))
                         (LETT |shortest| |d| . #4#))
                        ((SPADCALL |d| NIL (QREFELT $ 96))
                         (COND
                          ((SPADCALL
                            (SPADCALL |s| (CONS |a| |d|) (QREFELT $ 97))
                            (SPADCALL |s| (CONS |a| |shortest|) (QREFELT $ 97))
                            (QREFELT $ 98))
                           (LETT |shortest| |d| . #4#)))))))))))
                 (LETT #3# (CDR #3#) . #4#) (GO G190) G191 (EXIT NIL))
            (COND
             ((SPADCALL |shortest| NIL (QREFELT $ 95))
              (PROGN (LETT #2# NIL . #4#) (GO #5#))))
            (EXIT (CONS |a| |shortest|))))
          #5# (EXIT #2#)))) 

(SDEFUN |WGRPH;routeNodes;$2NniL;33|
        ((|s| $) (|a| . #1=(|NonNegativeInteger|)) (|b| . #1#)
         ($ |List| (|NonNegativeInteger|)))
        (|WGRPH;routeNodeRecursive| |s| |a| |b| NIL $)) 

(SDEFUN |WGRPH;routeArrowRecursive|
        ((|s| $) (|a| |NonNegativeInteger|) (|b| |NonNegativeInteger|)
         (|visited| |List| (|NonNegativeInteger|))
         ($ . #1=(|List| (|NonNegativeInteger|))))
        (SPROG
         ((#2=#:G1117 NIL)
          (|shortestFullPath| (|List| #3=(|NonNegativeInteger|)))
          (|shortest| (|List| #3#))
          (|fullPath| (|List| (|NonNegativeInteger|))) (|d| #1#) (|aa| #3#)
          (#4=#:G1118 NIL) (|arr| NIL)
          (|arrs|
           (|List|
            (|Record| (|:| |name| (|String|))
                      (|:| |arrType| (|NonNegativeInteger|))
                      (|:| |fromOb| (|NonNegativeInteger|))
                      (|:| |toOb| (|NonNegativeInteger|))
                      (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                      (|:| |map| (|List| (|NonNegativeInteger|))))))
          (|arrn| (|NonNegativeInteger|)))
         (SEQ
          (EXIT
           (SEQ
            (COND
             ((SPADCALL (SPADCALL |visited| (QREFELT $ 44))
                        (LENGTH (SPADCALL |s| (QREFELT $ 56))) (QREFELT $ 94))
              (PROGN
               (LETT #2# (LIST 0) . #5=(|WGRPH;routeArrowRecursive|))
               (GO #6=#:G1116))))
            (LETT |shortest| (LIST 0) . #5#)
            (COND ((EQL |a| |b|) (PROGN (LETT #2# NIL . #5#) (GO #6#))))
            (LETT |arrn| (SPADCALL |s| |a| |b| (QREFELT $ 100)) . #5#)
            (COND
             ((SPADCALL |arrn| 0 (QREFELT $ 64))
              (PROGN (LETT #2# (LIST |arrn|) . #5#) (GO #6#))))
            (LETT |aa| 0 . #5#) (LETT |shortestFullPath| (LIST 0) . #5#)
            (LETT |arrs| (SPADCALL |s| (QREFELT $ 57)) . #5#)
            (SEQ (LETT |arr| NIL . #5#) (LETT #4# |arrs| . #5#) G190
                 (COND
                  ((OR (ATOM #4#) (PROGN (LETT |arr| (CAR #4#) . #5#) NIL))
                   (GO G191)))
                 (SEQ
                  (EXIT
                   (COND
                    ((SPADCALL |s| |a| (QVELT |arr| 2) (QREFELT $ 79))
                     (SEQ
                      (LETT |aa|
                            (SPADCALL |s| |a| (QVELT |arr| 2) (QREFELT $ 100))
                            . #5#)
                      (LETT |d|
                            (|WGRPH;routeArrowRecursive| |s| (QVELT |arr| 2)
                             |b| (SPADCALL |visited| |a| (QREFELT $ 70)) $)
                            . #5#)
                      (LETT |fullPath| (CONS |aa| |d|) . #5#)
                      (EXIT
                       (COND
                        ((SPADCALL |shortest| (LIST 0) (QREFELT $ 95))
                         (SEQ (LETT |shortest| |d| . #5#)
                              (EXIT
                               (LETT |shortestFullPath| |fullPath| . #5#))))
                        ((SPADCALL |d| (LIST 0) (QREFELT $ 96))
                         (COND
                          ((SPADCALL (SPADCALL |s| |fullPath| (QREFELT $ 101))
                                     (SPADCALL |s| |shortestFullPath|
                                               (QREFELT $ 101))
                                     (QREFELT $ 98))
                           (SEQ (LETT |shortest| |d| . #5#)
                                (EXIT
                                 (LETT |shortestFullPath| |fullPath|
                                       . #5#)))))))))))))
                 (LETT #4# (CDR #4#) . #5#) (GO G190) G191 (EXIT NIL))
            (COND
             ((SPADCALL |shortest| (LIST 0) (QREFELT $ 95))
              (PROGN (LETT #2# (LIST 0) . #5#) (GO #6#))))
            (EXIT |shortestFullPath|)))
          #6# (EXIT #2#)))) 

(SDEFUN |WGRPH;routeArrows;$2NniL;35|
        ((|s| $) (|a| . #1=(|NonNegativeInteger|)) (|b| . #1#)
         ($ |List| (|NonNegativeInteger|)))
        (|WGRPH;routeArrowRecursive| |s| |a| |b| NIL $)) 

(SDEFUN |WGRPH;distanceWeighted;$2NniU;36|
        ((|s| $) (|a| |NonNegativeInteger|) (|b| |NonNegativeInteger|)
         ($ |Union| W "disjoint"))
        (SPROG ((#1=#:G1130 NIL) (|r| (|List| (|NonNegativeInteger|))))
               (SEQ
                (EXIT
                 (SEQ
                  (LETT |r| (|WGRPH;routeNodeRecursive| |s| |a| |b| NIL $)
                        . #2=(|WGRPH;distanceWeighted;$2NniU;36|))
                  (COND
                   ((EQL (SPADCALL |r| (QREFELT $ 44)) 0)
                    (PROGN
                     (LETT #1# (CONS 1 "disjoint") . #2#)
                     (GO #3=#:G1129))))
                  (EXIT (CONS 0 (SPADCALL |s| |r| (QREFELT $ 97))))))
                #3# (EXIT #1#)))) 

(SDEFUN |WGRPH;getWeightBetween|
        ((|s| $) (|i1| |NonNegativeInteger|) (|i2| |NonNegativeInteger|) ($ W))
        (SPROG
         ((|res| (W)) (|isDisjoint| (|Boolean|)) (#1=#:G1142 NIL) (|arr| NIL)
          (|arrs|
           (|List|
            (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                      (|:| |fromOb| (|NonNegativeInteger|))
                      (|:| |toOb| (|NonNegativeInteger|))
                      (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                      (|:| |map| (|List| (|NonNegativeInteger|)))))))
         (SEQ (LETT |isDisjoint| 'T . #2=(|WGRPH;getWeightBetween|))
              (LETT |res| (|spadConstant| $ 9) . #2#)
              (LETT |arrs| (QCDR |s|) . #2#)
              (SEQ (LETT |arr| NIL . #2#) (LETT #1# |arrs| . #2#) G190
                   (COND
                    ((OR (ATOM #1#) (PROGN (LETT |arr| (CAR #1#) . #2#) NIL))
                     (GO G191)))
                   (SEQ
                    (EXIT
                     (COND
                      (|isDisjoint|
                       (COND
                        ((EQL (QVELT |arr| 2) |i1|)
                         (COND
                          ((EQL (QVELT |arr| 3) |i2|)
                           (SEQ (LETT |res| (QVELT |arr| 1) . #2#)
                                (EXIT (LETT |isDisjoint| NIL . #2#))))))))
                      ((EQL (QVELT |arr| 2) |i1|)
                       (COND
                        ((EQL (QVELT |arr| 3) |i2|)
                         (COND
                          ((SPADCALL (QVELT |arr| 1) |res| (QREFELT $ 98))
                           (LETT |res| (QVELT |arr| 1) . #2#)))))))))
                   (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
              (EXIT |res|)))) 

(SDEFUN |WGRPH;routeNodeWeight;$LW;38|
        ((|s| $) (|r| |List| (|NonNegativeInteger|)) ($ W))
        (SPROG
         ((|lasti| (|NonNegativeInteger|)) (|fst| (|Boolean|)) (|res| (W))
          (|w| (W)) (#1=#:G1148 NIL) (|i| NIL))
         (SEQ
          (LETT |res| (|spadConstant| $ 9)
                . #2=(|WGRPH;routeNodeWeight;$LW;38|))
          (LETT |fst| 'T . #2#) (LETT |lasti| 0 . #2#)
          (SEQ (LETT |i| NIL . #2#) (LETT #1# |r| . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |i| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ
                (COND
                 ((NULL |fst|)
                  (SEQ
                   (LETT |w| (|WGRPH;getWeightBetween| |s| |lasti| |i| $)
                         . #2#)
                   (EXIT
                    (LETT |res| (SPADCALL |res| |w| (QREFELT $ 105)) . #2#)))))
                (LETT |fst| NIL . #2#) (EXIT (LETT |lasti| |i| . #2#)))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT |res|)))) 

(SDEFUN |WGRPH;routeArrowWeight;$LW;39|
        ((|s| $) (|r| |List| (|NonNegativeInteger|)) ($ W))
        (SPROG
         ((|res| (W))
          (|a|
           (|Record| (|:| |name| (|String|)) (|:| |weight| W)
                     (|:| |fromOb| (|NonNegativeInteger|))
                     (|:| |toOb| (|NonNegativeInteger|))
                     (|:| |xOffset| (|Integer|)) (|:| |yOffset| (|Integer|))
                     (|:| |map| (|List| (|NonNegativeInteger|)))))
          (#1=#:G1154 NIL) (|i| NIL))
         (SEQ
          (LETT |res| (|spadConstant| $ 9)
                . #2=(|WGRPH;routeArrowWeight;$LW;39|))
          (SEQ (LETT |i| NIL . #2#) (LETT #1# |r| . #2#) G190
               (COND
                ((OR (ATOM #1#) (PROGN (LETT |i| (CAR #1#) . #2#) NIL))
                 (GO G191)))
               (SEQ (LETT |a| (SPADCALL (QCDR |s|) |i| (QREFELT $ 106)) . #2#)
                    (EXIT
                     (LETT |res| (SPADCALL |res| (QVELT |a| 1) (QREFELT $ 105))
                           . #2#)))
               (LETT #1# (CDR #1#) . #2#) (GO G190) G191 (EXIT NIL))
          (EXIT |res|)))) 

(SDEFUN |WGRPH;weightedDistanceMatrix;$Tda;40|
        ((|s| $) ($ |TwoDimensionalArray| (|Union| W #1="disjoint")))
        (SPROG
         ((#2=#:G1168 NIL) (|v| NIL) (#3=#:G1167 NIL) (|u| NIL)
          (|m| (|TwoDimensionalArray| (|Union| W #1#)))
          (|n| (|NonNegativeInteger|)))
         (SEQ
          (LETT |n| (LENGTH (SPADCALL |s| (QREFELT $ 56)))
                . #4=(|WGRPH;weightedDistanceMatrix;$Tda;40|))
          (LETT |m| (MAKE_MATRIX1 |n| |n| (CONS 0 (|spadConstant| $ 9))) . #4#)
          (SEQ (LETT |u| 1 . #4#) (LETT #3# |n| . #4#) G190
               (COND ((|greater_SI| |u| #3#) (GO G191)))
               (SEQ
                (EXIT
                 (SEQ (LETT |v| 1 . #4#) (LETT #2# |n| . #4#) G190
                      (COND ((|greater_SI| |v| #2#) (GO G191)))
                      (SEQ
                       (EXIT
                        (QSETAREF2O |m| |u| |v|
                                    (SPADCALL |s| |u| |v| (QREFELT $ 104)) 1
                                    1)))
                      (LETT |v| (|inc_SI| |v|) . #4#) (GO G190) G191
                      (EXIT NIL))))
               (LETT |u| (|inc_SI| |u|) . #4#) (GO G190) G191 (EXIT NIL))
          (EXIT |m|)))) 

(SDEFUN |WGRPH;coerce;Fp$;41| ((|poset| |FinitePoset| S) ($ $))
        (SPADCALL |poset| (QREFELT $ 38))) 

(DECLAIM (NOTINLINE |WeightedGraph;|)) 

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

(DEFUN |WeightedGraph;| (|#1| |#2|)
  (SPROG ((|pv$| NIL) ($ NIL) (|dv$| NIL) (DV$2 NIL) (DV$1 NIL))
         (PROGN
          (LETT DV$1 (|devaluate| |#1|) . #1=(|WeightedGraph|))
          (LETT DV$2 (|devaluate| |#2|) . #1#)
          (LETT |dv$| (LIST '|WeightedGraph| DV$1 DV$2) . #1#)
          (LETT $ (GETREFV 121) . #1#)
          (QSETREFV $ 0 |dv$|)
          (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
          (|haddProp| |$ConstructorCache| '|WeightedGraph| (LIST DV$1 DV$2)
                      (CONS 1 $))
          (|stuffDomainSlots| $)
          (QSETREFV $ 6 |#1|)
          (QSETREFV $ 7 |#2|)
          (SETF |pv$| (QREFELT $ 3))
          (QSETREFV $ 8
                    (|Record|
                     (|:| |objects|
                          (|List|
                           (|Record| (|:| |value| |#1|)
                                     (|:| |posX| (|NonNegativeInteger|))
                                     (|:| |posY| (|NonNegativeInteger|))
                                     (|:| |weight| |#2|))))
                     (|:| |arrows|
                          (|List|
                           (|Record| (|:| |name| (|String|))
                                     (|:| |weight| |#2|)
                                     (|:| |fromOb| (|NonNegativeInteger|))
                                     (|:| |toOb| (|NonNegativeInteger|))
                                     (|:| |xOffset| (|Integer|))
                                     (|:| |yOffset| (|Integer|))
                                     (|:| |map|
                                          (|List| (|NonNegativeInteger|))))))))
          $))) 

(MAKEPROP '|WeightedGraph| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) '|Rep|
              (0 . |Zero|) (|List| 6) |WGRPH;weightedGraph;L$;1|
              (|Record| (|:| |value| 6) (|:| |posX| 25) (|:| |posY| 25)
                        (|:| |weight| 7))
              (|List| 12) |WGRPH;weightedGraph;L$;2|
              (|Record| (|:| |name| 51) (|:| |weight| 7) (|:| |fromOb| 25)
                        (|:| |toOb| 25) (|:| |xOffset| 39) (|:| |yOffset| 39)
                        (|:| |map| 41))
              (|List| 15) |WGRPH;weightedGraph;LL$;3| (4 . |concat|)
              (10 . |concat|)
              (|Record| (|:| |value| 6) (|:| |posX| 25) (|:| |posY| 25))
              (|List| 20)
              (|Record| (|:| |name| 51) (|:| |arrType| 25) (|:| |fromOb| 25)
                        (|:| |toOb| 25) (|:| |xOffset| 39) (|:| |yOffset| 39)
                        (|:| |map| 41))
              (|List| 22) |WGRPH;weightedGraph;LL$;4| (|NonNegativeInteger|)
              (16 . |createX|) (22 . |createY|) (28 . |concat|) (34 . |concat|)
              (|Record| (|:| |fromOb| 25) (|:| |toOb| 25)) (|List| 30)
              |WGRPH;weightedGraph;LL$;5| (|FinitePoset| 6) (40 . |getVert|)
              (|List| (|List| 47)) (45 . |getArr|) (50 . |concat|)
              |WGRPH;weightedGraph;Fp$;6| (|Integer|) (56 . |elt|) (|List| 25)
              (|List| 41) (62 . |elt|) (68 . |#|) (73 . |elt|)
              |WGRPH;weightedGraph;LL$;7| (|Boolean|) (79 . =)
              |WGRPH;addObject!;$S$;8| |WGRPH;addObject!;$R$;9| (|String|)
              |WGRPH;addWArrow!;$S2NniW$;12| |WGRPH;addArrow!;$R$;10|
              |WGRPH;addArrow!;$S2Nni$;11| (85 . =) |WGRPH;getVertices;$L;13|
              |WGRPH;getArrows;$L;14| |WGRPH;initial;$;15|
              |WGRPH;terminal;S$;16| (91 . <=) |WGRPH;cycleOpen;LS$;17|
              |WGRPH;cycleClosed;LS$;18| |WGRPH;unit;LS$;19| (97 . ~=)
              |WGRPH;kgraph;LS$;20| (103 . |concat|) (109 . |concat|)
              |WGRPH;+;3$;21| (115 . |position|) (121 . |concat|)
              |WGRPH;merge;3$;22| (127 . |diagramWidth|)
              (132 . |diagramHeight|) (|Product| 6 6) (137 . |construct|)
              (|Record| (|:| |value| 74) (|:| |posX| 25) (|:| |posY| 25)
                        (|:| |weight| 7))
              (|List| 76) (143 . |concat|) (149 . |isDirectSuccessor?|)
              (156 . |arrowName|) (|List| $) (163 . |concat|)
              (|WeightedGraph| 74 7) (168 . |weightedGraph|) |WGRPH;*;2$Wg;25|
              |WGRPH;cartesian;2$Wg;26| (|Mapping| 6 6 6)
              |WGRPH;closedTensor;2$M$;28| |WGRPH;closedCartesian;2$M$;29|
              (174 . |elt|) (180 . |setelt!|) |WGRPH;map;$LL2I$;30|
              |WGRPH;mapContra;$LL2I$;31| (187 . >) (193 . =) (199 . ~=)
              |WGRPH;routeNodeWeight;$LW;38| (205 . <)
              |WGRPH;routeNodes;$2NniL;33| (211 . |getArrowIndex|)
              |WGRPH;routeArrowWeight;$LW;39| |WGRPH;routeArrows;$2NniL;35|
              (|Union| 7 '"disjoint") |WGRPH;distanceWeighted;$2NniU;36|
              (218 . +) (224 . |elt|) (|TwoDimensionalArray| 103)
              |WGRPH;weightedDistanceMatrix;$Tda;40| |WGRPH;coerce;Fp$;41|
              (|Void|) (|Scene| (|SCartesian| '2)) (|Matrix| 39) (|Matrix| 25)
              (|List| (|Loop|)) (|List| 116) (|Tree| 39) (|DirectedGraph| $)
              (|SingleInteger|) (|OutputForm|) (|HashState|))
           '#(~= 230 |weightedGraph| 236 |weightedDistanceMatrix| 275 |unit|
              280 |terminal| 286 |subdiagramSvg| 291 |spanningTreeNode| 299
              |spanningTreeArrow| 305 |spanningForestNode| 311
              |spanningForestArrow| 316 |routeNodes| 321 |routeNodeWeight| 328
              |routeArrows| 334 |routeArrowWeight| 341 |outDegree| 347
              |nodeToNode| 353 |nodeToArrow| 359 |nodeFromNode| 365
              |nodeFromArrow| 371 |min| 377 |merge| 388 |max| 394 |mapContra|
              405 |map| 414 |looseEquals| 423 |loopsNodes| 429 |loopsAtNode|
              434 |loopsArrows| 440 |latex| 445 |laplacianMatrix| 450 |kgraph|
              455 |isGreaterThan?| 461 |isFunctional?| 468 |isFixPoint?| 473
              |isDirected?| 479 |isDirectSuccessor?| 483 |isAcyclic?| 490
              |initial| 495 |incidenceMatrix| 499 |inDegree| 504 |hashUpdate!|
              510 |hash| 516 |getVertices| 521 |getVertexIndex| 526 |getArrows|
              532 |getArrowIndex| 537 |flatten| 544 |distanceWeighted| 549
              |distanceMatrix| 556 |distance| 561 |diagramsSvg| 568
              |diagramWidth| 575 |diagramSvg| 580 |diagramHeight| 587
              |deepDiagramSvg| 592 |cycleOpen| 599 |cycleClosed| 605 |createY|
              611 |createX| 617 |createWidth| 623 |coerce| 628 |closedTensor|
              643 |closedCartesian| 650 |cartesian| 657 |arrowsToNode| 663
              |arrowsToArrow| 669 |arrowsFromNode| 675 |arrowsFromArrow| 681
              |arrowName| 687 |adjacencyMatrix| 694 |addWArrow!| 699
              |addObject!| 708 |addArrow!| 720 = 751 + 757 * 763)
           'NIL
           (CONS (|makeByteWordVec2| 1 '(0 0 0 0))
                 (CONS '#(|FiniteGraph&| |SetCategory&| NIL |BasicType&|)
                       (CONS
                        '#((|FiniteGraph| 6) (|SetCategory|)
                           (|CoercibleTo| 119) (|BasicType|))
                        (|makeByteWordVec2| 120
                                            '(0 7 0 9 2 16 0 0 15 18 2 13 0 0
                                              12 19 2 0 25 25 25 26 2 0 25 25
                                              25 27 2 21 0 0 20 28 2 23 0 0 22
                                              29 1 33 10 0 34 1 33 35 0 36 2 31
                                              0 0 30 37 2 10 6 0 39 40 2 42 41
                                              0 39 43 1 41 25 0 44 2 41 25 0 39
                                              45 2 13 47 0 0 48 2 16 47 0 0 55
                                              2 25 47 0 0 60 2 25 47 0 0 64 2
                                              13 0 0 0 66 2 16 0 0 0 67 2 13 39
                                              12 0 69 2 41 0 0 25 70 1 0 25 0
                                              72 1 0 25 0 73 2 74 0 6 6 75 2 77
                                              0 0 76 78 3 0 47 0 25 25 79 3 0
                                              51 0 25 25 80 1 51 0 81 82 2 83 0
                                              77 16 84 2 13 12 0 39 90 3 13 12
                                              0 39 12 91 2 25 47 0 0 94 2 41 47
                                              0 0 95 2 41 47 0 0 96 2 7 47 0 0
                                              98 3 0 25 0 25 25 100 2 7 0 0 0
                                              105 2 16 15 0 39 106 2 0 47 0 0 1
                                              2 0 0 10 42 46 2 0 0 10 31 32 1 0
                                              0 33 38 2 0 0 21 23 24 1 0 0 13
                                              14 2 0 0 13 16 17 1 0 0 10 11 1 0
                                              107 0 108 2 0 0 10 51 63 1 0 0 6
                                              59 4 0 110 111 0 47 47 1 2 0 116
                                              0 25 1 2 0 116 0 25 1 1 0 115 0 1
                                              1 0 115 0 1 3 0 41 0 25 25 99 2 0
                                              7 0 41 97 3 0 41 0 25 25 102 2 0
                                              7 0 41 101 2 0 25 0 25 1 2 0 41 0
                                              25 1 2 0 41 0 25 1 2 0 41 0 25 1
                                              2 0 41 0 25 1 2 0 25 0 41 1 1 0
                                              25 0 1 2 0 0 0 0 71 2 0 25 0 41 1
                                              1 0 25 0 1 5 0 0 0 41 10 39 39 93
                                              5 0 0 0 41 10 39 39 92 2 0 47 0 0
                                              1 1 0 114 0 1 2 0 114 0 25 1 1 0
                                              114 0 1 1 0 51 0 1 1 0 112 0 1 2
                                              0 0 10 51 65 3 0 47 0 25 25 1 1 0
                                              47 0 1 2 0 47 0 25 1 0 0 47 1 3 0
                                              47 0 25 25 79 1 0 47 0 1 0 0 0 58
                                              1 0 112 0 1 2 0 25 0 25 1 2 0 120
                                              120 0 1 1 0 118 0 1 1 0 21 0 56 2
                                              0 25 0 6 1 1 0 23 0 57 3 0 25 0
                                              25 25 100 1 0 0 117 1 3 0 103 0
                                              25 25 104 1 0 112 0 1 3 0 39 0 25
                                              25 1 3 0 110 51 81 47 1 1 0 25 0
                                              72 3 0 110 51 0 47 1 1 0 25 0 73
                                              3 0 110 51 0 47 1 2 0 0 10 51 61
                                              2 0 0 10 51 62 2 0 25 25 25 27 2
                                              0 25 25 25 26 1 0 25 25 1 1 0 0
                                              33 109 1 0 119 0 1 1 0 119 0 1 3
                                              0 0 0 0 87 88 3 0 0 0 0 87 89 2 0
                                              83 0 0 86 2 0 41 0 25 1 2 0 41 0
                                              25 1 2 0 41 0 25 1 2 0 41 0 25 1
                                              3 0 51 0 25 25 80 1 0 113 0 1 5 0
                                              0 0 51 25 25 7 52 2 0 0 0 20 50 2
                                              0 0 0 6 49 4 0 0 0 51 6 6 1 5 0 0
                                              0 51 25 25 41 1 2 0 0 0 22 53 4 0
                                              0 0 51 25 25 54 2 0 47 0 0 1 2 0
                                              0 0 0 68 2 0 83 0 0 85)))))
           '|lookupComplete|)) 
