aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-01 09:23:22 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-01 09:46:41 -0400
commit0e0bc9b334987e4b0fd17f62946af029688af146 (patch)
tree99ed692b966181c18ccac5d5d27a68db01fcaeb7 /src
parent9cdf7da46d5621b8bdaceae82ce1174237d19d97 (diff)
Fast handling for empty cells in search
Diffstat (limited to 'src')
-rw-r--r--src/r1.bqn2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/r1.bqn b/src/r1.bqn
index d99c30f0..6747f3ca 100644
--- a/src/r1.bqn
+++ b/src/r1.bqn
@@ -172,7 +172,7 @@ _search←{ # 0 for ∊˜, 1 for ⊐
"p⊐n or n∊p: Rank of n must be at least cell rank of p" ! c≤=𝕩
n←≠𝕨 ⋄ k←1×´s←1 Cell 𝕨 ⋄ cx←c-˜=𝕩
lx←1×´sh←cx↑≢𝕩
- sh ⥊ 𝕨 (0<n)◶⟨0,s MatchS cx⊸Cell⟩◶{𝕩⋄(ind×n)⌜↕lx}‿{
+ sh ⥊ 𝕨 (e←0<n×k)◶⟨0,s MatchS cx⊸Cell⟩◶{𝕩⋄(ind◶⟨n⊸>,⊢⟩ n×e)⌜↕lx}‿{
cc ← (⊑⟜(⥊𝕨))⊸(1-Match)⟜(⊑⟜(⥊𝕩)) _getCellCmp k
𝕨 ×○(8<≠∘⥊)◶{𝕩
i‿j←(k⊸×⌜↕)⌜n‿lx ⋄ {Red CC⟜𝕩⌜i}⌜j