aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-04-30 12:57:58 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-04-30 12:57:58 -0400
commit00bd4d249d7b4c453ef818a09ce7f55a854e61fc (patch)
tree78706ee4e21f49e04d33201a5a39e32d20c38f5c /src
parent768e5be04ef9fe11e2219c01b502614d3cf2764c (diff)
_self-based Occurrence Count
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 36f9f90c..571953d6 100644
--- a/src/r1.bqn
+++ b/src/r1.bqn
@@ -198,6 +198,7 @@ Indices←{
}
Rep ← Indices⊸⊏
SelfClas ← (PermInv∘⍋∘Rep˜⊏˜¯1+`⊢) _self
+OccurrenceCount ← ↕∘≠⊸(⊣-¨·⌈`ר) _self
Transpose←(0<=)◶⟨ToArray,{
l←≠𝕩 ⋄ m←1×´c←1 Cell 𝕩
@@ -688,7 +689,6 @@ Find←{
0 Fill 𝕨 ≡⎉r ((1+r-⊸↑≢𝕩)⌊≢𝕨)⊸↕⎉r 𝕩
}○ToArray
-OccurrenceCount ← 0 Fill ⊐˜(⊢-⊏)⍋∘⍋
ProgressiveIndexOf ← 0 Fill {
c←1-˜=𝕨
"⊒: Rank of 𝕨 must be at least 1" ! 0≤c