Atom - - Grade Up


Tags: array , number , combinatorics

Arity: monadic

This atom is monadic, which means it takes one argument.


Grade up a list; that is, sort its indices by the corresponding values.


Indexing the graded list into the list (Ụị$) sorts the list. Grading up twice returns a permutation of the same length as the list where larger elements in the permutation correspond to larger elemenets in the original list (it ranks the elements). You can negate the values before grading to grade down (NỤ$).