GNAT Heap_Sort g-heasor ads (GNAT Reference Manual) (original) (raw)
Next: GNAT.Heap_Sort_A (g-hesora.ads), Previous: GNAT.Generic_Fast_Math_Functions (g-gfmafu.ads), Up: The GNAT Library [Contents][Index]
12.74 GNAT.Heap_Sort
(g-heasor.ads
) ¶
Provides a general implementation of heap sort usable for sorting arbitrary data items. Exchange and comparison procedures are provided by passing access-to-procedure values. The algorithm used is a modified heap sort that performs approximately N*log(N) comparisons in the worst case.