<<   >>

3. Index-Of Selfie

x⍳x

Index-of with both arguments being the same, an instance of a “selfie” [15]. x⍳x are like ID numbers; questions of identity on x can often be answered more efficiently on x⍳x than on x itself.

The x⍳x selfie occurs in several important and useful computations:

((⍳≢x)=x⍳x)⌿x nub (unique)
(x⍳x)∘.=(x⍳y) an efficient computation for x∧.=⍉y for matrices x and y [16]
(x⍳x)∘.=(x⍳y) an efficient computation for x∘.≡y for non-simple vector x [17]
(⍉↑x⍳¨x)⍳(⍉↑x⍳¨y)  inverted table index-of [18]
(x⍳x) f⌸ y equivalent to x f⌸ y