User:⊂⍺m: Difference between revisions

Jump to navigation Jump to search
21 bytes added ,  20:47, 10 July 2023
m
Line 46: Line 46:
           assert←{⍺←'LENGTH ERROR: one frame must be a prefix of the other' ⋄ 0∊⍵:⍺ ⎕SIGNAL 8 ⋄ void←0}
           assert←{⍺←'LENGTH ERROR: one frame must be a prefix of the other' ⋄ 0∊⍵:⍺ ⎕SIGNAL 8 ⋄ void←0}
           r←1↓⌽3⍴⌽⍵⍵                      ⍝ dyadic ranks
           r←1↓⌽3⍴⌽⍵⍵                      ⍝ dyadic ranks
           rm←r(⌊∘≢∘⍴)¨⍺ ⍵                 ⍝ modified ranks; rm⍲.≤(≢⍴)¨⍺ ⍵
           rm←r⌊∘(≢⍴)¨⍺ ⍵                 ⍝ modified ranks; rm⍲.≤(≢⍴)¨⍺ ⍵
           lf rf←(-rm)↓¨⍴¨⍺⍵              ⍝ frames
           lf rf←(-rm)↓¨⍴¨⍺⍵              ⍝ frames
           cf←lf{⍺<⍥≢⍵:⍺ ⋄ ⍵}rf            ⍝ common frame, assuming frames agree
           cf←lf{⍺<⍥≢⍵:⍺ ⋄ ⍵}rf            ⍝ common frame, assuming frames agree
Line 54: Line 54:
       }
       }


       i←⊢⍴∘⍳×/     ⍝ J's i.3 4 5
       i←⊢⍴∘⍳×/                             ⍝ J's i.3 4 5
       x←i⊢2 3
       x←i⊢2 3
       y←i⊢2 3 4 5
       y←i⊢2 3 4 5


       ⍝ these should match…     (x{⍺⍵}_FA_ 1 2⊢y)  ≡  (x{⍺⍵}⍤1 2⍤¯1⊢y)
       ⍝ these should match:     (x{⍺⍵}_FA_ 1 2⊢y)  ≡  (x{⍺⍵}⍤1 2⍤¯1⊢y)


       x{⍺⍵}_FA_ 1 2⊢y
       x{⍺⍵}_FA_ 1 2⊢y
       ⍝ no result; somehow went to the end of the assert dfn
       ⍝ no result; somehow went to the end of the assert dfn
</syntaxhighlight>
</syntaxhighlight>
trusted
83

edits

Navigation menu