diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-20 13:20:01 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-05-20 13:20:56 -0400 |
| commit | 2a4eb25fefeabb2d615694a32064a6e4b85749f4 (patch) | |
| tree | a2528b5ec610e218e161aa5fecf3c3b62a3685bf /src | |
| parent | 71bdbdbe1c61628cdccb1623f46c63b62e49b961 (diff) | |
Lower-level implementation for /⁼ checking
Diffstat (limited to 'src')
| -rw-r--r-- | src/r1.bqn | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -207,6 +207,12 @@ Indices←{ "/𝕩: 𝕩 must consist of natural numbers" ! 1×´Nat⌜𝕩 Ind 𝕩 } +IndicesInv←{ + IA 1==𝕩 + IA 1×´Nat⌜𝕩 + IX (0⊸≤)◶⟨1,1×´(⊢≤○(⊑⟜𝕩)1⊸+)⌜∘↕⟩-˜≠𝕩 + GroupLen 𝕩 +} SelfClas ← (PermInv∘⍋∘Rep˜⊏˜¯1+`⊢) _self OccurrenceCount ← ↕∘≠⊸(⊣-¨·⌈`ר) _self @@ -823,7 +829,7 @@ PrimInverse ← INF _lookup_ ⟨ '↕', ≢_invChk_↕ ⊘ (IA∘0) # Should trace edge and invChk '⌽', ⌽ ⊘ (-⊸⌽) '⍉', TransposeInv ⊘ ReorderAxesInv - '/', {IA 1==𝕩⋄IA 1∧´Nat⌜𝕩⋄IX(1∧´¯1⊸↓≤1⊸↓)𝕩⋄GroupLen𝕩}⊘(IA∘0) + '/', IndicesInv ⊘ (IA∘0) '⊔', GroupIndsInv ⊘ GroupInv ⟩ SwapInverse ← INF _lookup_ ⟨ |
