Grade: Difference between revisions

Jump to navigation Jump to search
266 bytes added ,  13:19, 9 February 2021
(Created page with "{{Built-ins|Grade|⍋|⍒}} is a pair of ambivalent primitive functions related to sorting. Instea...")
 
(2 intermediate revisions by 2 users not shown)
Line 29: Line 29:
</source>
</source>


Grade usually performs [[wikipedia:sorting algorithm#stability|stable sorting]], so that the indices of the repeated major cells are sorted by the order of appearance. Because of this, Grade Down produces the reverse of Grade Up only if all the major cells are unique.
Grade performs [[wikipedia:sorting algorithm#stability|stable sorting]], so that the indices of the repeated major cells are sorted by the order of appearance. Because of this, Grade Down produces the reverse of Grade Up only if all the major cells are unique.


<source lang=apl>
<source lang=apl>
Line 112: Line 112:
* APLX [http://microapl.com/apl_help/ch_020_020_630.htm Grade Up], [http://microapl.com/apl_help/ch_020_020_640.htm Grade Down]
* APLX [http://microapl.com/apl_help/ch_020_020_630.htm Grade Up], [http://microapl.com/apl_help/ch_020_020_640.htm Grade Down]
* J Dictionary [https://www.jsoftware.com/help/dictionary/d422.htm Grade Up], [https://www.jsoftware.com/help/dictionary/d432.htm Grade Down], NuVoc [https://code.jsoftware.com/wiki/Vocabulary/slashco Grade]
* J Dictionary [https://www.jsoftware.com/help/dictionary/d422.htm Grade Up], [https://www.jsoftware.com/help/dictionary/d432.htm Grade Down], NuVoc [https://code.jsoftware.com/wiki/Vocabulary/slashco Grade]
* [https://mlochbaum.github.io/BQN/doc/order.html#grade BQN]
=== Libraries ===
* [https://github.com/abrudz/Sort abrudz/Sort]: Examples of sorting variations ([[Atomic vector|Classic]], [[wikipedia:Natural_sort_order|Natural]], Danish, Finnish, German) using dyadic grade


{{APL built-ins}}[[Category:Primitive functions]]
{{APL built-ins}}[[Category:Primitive functions]]

Navigation menu