Nub in
Jump to navigation
Jump to search
- The name "self-classify" may also refer to the related function Classify, which returns a vector of indices instead of a boolean matrix.
Nub in (=
), nub-classify, or self-classify, is a monadic function that indicates which unique cell each of its argument cells matches. It returns a boolean matrix where the first axis corresponds to unique cells and the second to all cells, and might be implemented as {(∪⍵)∘.≡⍵}
or ∪∘.≡⊢
in a nested APL (in SHARP APL, (≡⍤0)
must be used in place of ≡
). The function was defined in A Dictionary of APL and is implemented by SAX and J. However, it is deprecated in J because of the result size, which can be quadratic in the size of the argument, and Roger Hui eventually began to use "self-classify" to refer to the Classify function instead.
Documentation
- J NuVoc, dictionary