diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-09 13:53:14 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-09 13:53:14 -0400 |
| commit | 4f7974ff14a5ba4f7d09aeb9cf931198a7cf8cc6 (patch) | |
| tree | bb8304fff74dc52bae3a601db16c753251bf8fb2 /src | |
| parent | 6fee64c6141cf783c3d2ac758021d4b39f48c2b2 (diff) | |
Iterate forward across axes to generate inner Join indices
Diffstat (limited to 'src')
| -rw-r--r-- | src/r.bqn | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -326,8 +326,7 @@ Join←(1≠=)◶⟨∨´1≠=⌜,1⟩◶{ q←1 ⋄ l←(≢𝕩){m←𝕩⊸⊑⌜s ⋄ r←⊑⟜m⌜q×↕𝕨 ⋄ scm!m≡n⥊r⊣⌜↕q ⋄ q×↩𝕨 ⋄ r}¨○⌽↕=𝕩 t←(=𝕩)↓0⊑s "∾𝕩: 𝕩 element trailing shapes must match" ! ∧´(t≡(=𝕩)⊸↓)⌜s - i←<0 ⋄ q↩<1 - {s←0⋄p←{o←s⋄s+↩𝕩⋄o}⌜𝕩 ⋄ j←↕s ⋄ i↩(j⊢⌜i)+(j-𝕩/p)×⌜q ⋄ q×⌜˜↩𝕩/𝕩}⌜l + i←(<0) {s←0⋄p←{o←s⋄s+↩𝕩⋄o}⌜𝕨 ⋄ (𝕩×⌜𝕨/𝕨)+𝕩⊢⌜(↕s)-𝕨/p}´ l i(0<≠t)◶⟨⊑⟜⥊¨,{ti←t⥊↕tp←×´t⋄((tp×𝕨)+⌜ti)⊑⟜⥊¨𝕩⊣⌜ti}⟩(⌽l)/𝕩 }⍟(0<≠∘⥊) |
