diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-17 20:53:49 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-17 20:55:51 -0400 |
| commit | 2927dd121c6cc8a2625c4a25a202c9660d359069 (patch) | |
| tree | 86c61e47b633c8e3e1dfa93e789efbfbbdea86bd /src | |
| parent | a67cdaa4eeed2cd4a44026d166accc70a51329b4 (diff) | |
Flatter way to compute multi-body indices
Diffstat (limited to 'src')
| -rw-r--r-- | src/c.bqn | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -302,8 +302,8 @@ Parse ← {r‿vn‿i‿e‿def←𝕨⋄nv←≠vn # Instruction source positions MI←-⊸↓˜⟜≠∾g⊏˜⊢⋄oj←(rt-∘≠⊸⌽oi⌊1-˜≠i)Mi∾⟨1-˜at,oa,fa⟩ ind←⟨oj,oj Mi fa⊏IT»¬ro∨ma⟩(¯1∾˜or⊏(≠rt)⊸⌽)⊸⊏¨i‿e - cg←((⊏⟜cw∾0˙)+3ׯ1+`⊏⟜cf∾1˙)⊸⊔/cm∨↩fx∧1≠cw - ci←<˘⍉∧∘∾¨˝(1‿1≍0‿2)⊏⍉∘‿3⥊cg # Indices for multi-body blocks + cj←/1+1=ciw←cw⊏˜ci←/cm∨↩fx∧1≠cw + ci↩<˘∘‿2⥊(cj⊸⊏⊔˜¯1(↑∾˜cj(⊒∘⊣+⊏)(1<ciw)+↓)2ׯ1+`⊏⟜cf∾1˙)ci # Indices for multi-body blocks fq←⟨cf/ft,cf/¬fx,ci⌾((cf/cm)⊸/)/cf⟩ # Per-function data cq←⟨/1∾or≥oc-○≠rt,fsc+≠¨dn,dn,dx⟩ # Per-body data ⟨oc∾¯1⊑rc,u,fq,cq,ind⟩ # Overall output |
