diff options
| -rwxr-xr-x | dzref_full | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -372,12 +372,20 @@ _bins←{ c←1-˜=𝕨 ! 0≤c ! c≤=𝕩 - lw←×´sw←1↓≢𝕨 + lw←×´sw←1 Cell 𝕨 cw←lw 𝔽○(⊑⟜(⥊𝕨)) _getCellCmp 0 ! 0⊸<◶⟨1,∧´0≤˜·cw¨⟜(lw⊸+)lw×↕∘-⟜1⟩≠𝕨 - sx←c-⊸↑≢𝕩 ⋄ lc←sw 0 _cmpLen sx + cx←c-˜=𝕩 + sx←cx Cell 𝕩 ⋄ lc←sw 0 _cmpLen sx cc ← (⊑⟜(⥊𝕨))⊸𝔽⟜(⊑⟜(⥊𝕩)) _getCellCmp´ lc - ((×´sw)×↕≠𝕨) (0<≠𝕨)◶⟨0¨∘⊢,+˝Cc⌜≤0˜⟩ (×´sx)×(⊢⥊·↕×´)c-⊸↓≢𝕩 + n←≠𝕨 + B←(×´sw)⊸×⊸Cc≤0˜ + BS ← (0<n)◶0‿{ + Bx←B⟜𝕩 + R←{𝕨{a←Bx m←𝕩+h←⌊𝕨÷2⋄(h+a×2|𝕨)R a⊑𝕩‿m}⍟(>⟜1)𝕩} + 1+(n+1)R ¯1 + } + BS¨ (×´sx) × ⥊⟜(↕×´)⊑⟜(≢𝕩)¨↕cx } OccurrenceCount ← ⊐˜(⊢-⊏)⍋∘⍋ |
