heapsort-0.1.0: Heapsort of MArrays as a demo of imperative programming

Data.Array.MArray.Heapsort

Description

This module provides heapsort for an MArray with indices of Integral type. See any good algorithms text for a description of heapsort. Heapsort is O(n lg n) comparisons and exchanges in the worst case, and is reasonably efficient.

Synopsis

Documentation

sort :: (Integral i, Ix i, Ord e, MArray a e m) => a i e -> m ()Source

Sort the elements of the given MArray in increasing order.