Atom - - Grade Up

Characters:

Tags: array , number , combinatorics

Arity: monadic

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

Functionality

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

Details

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Ụ$).