 | vector-algorithms-0.3.4: Efficient algorithms for vector arrays | Contents | Index |
|
Data.Vector.Algorithms.Merge | Portability | Portable | Stability | Experimental | Maintainer | Dan Doel <dan.doel@gmail.com> |
|
|
|
Description |
This module implements a simple top-down merge sort. The temporary buffer
is preallocated to 1/2 the size of the input array, and shared through
the entire sorting process to ease the amount of allocation performed in
total. This is a stable sort.
|
|
Synopsis |
|
|
|
Documentation |
|
sort :: (PrimMonad m, MVector v e, Ord e) => v (PrimState m) e -> m () |
Sorts an array using the default comparison.
|
|
sortBy :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> m () |
Sorts an array using a custom comparison.
|
|
sortByBounds :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> Int -> Int -> m () |
Sorts a portion of an array [l,u) using a custom comparison.
|
|
type Comparison e = e -> e -> Ordering |
A type of comparisons between two values of a given type.
|
|
Produced by Haddock version 2.7.2 |