next up previous contents
Next: Generic Intrinsic and Library Up: Library Procedures Previous: Array Prefix and Suffix

Array Sorting Functions

HPF includes procedures for sorting multidimensional arrays. The SORT_UP and SORT_DOWN functions return sorted arrays; the GRADE_UP and GRADE_DOWN functions return sorting permutations. An array can be sorted along a given axis, or the whole array may be viewed as a sequence in array element order. The grade functions use stable sorts, allowing for convenient sorting of structures by major and minor keys.