Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- quickSort :: (Ord a, PrimMonad m, MVector mv a) => mv (PrimState m) a -> m ()
- quickSortBy :: (PrimMonad m, MVector mv a) => (a -> a -> Ordering) -> mv (PrimState m) a -> m ()
- quickSelect :: (Ord a, PrimMonad m, MVector mv a) => mv (PrimState m) a -> Int -> m a
- quickSelectBy :: (PrimMonad m, MVector mv a) => (a -> a -> Ordering) -> mv (PrimState m) a -> Int -> m a
- pivotPartitionBy :: (PrimMonad m, MVector mv a) => (a -> a -> Ordering) -> mv (PrimState m) a -> a -> m Int
- getMedian3PivotBy :: (PrimMonad m, MVector mv a) => (a -> a -> Ordering) -> mv (PrimState m) a -> m a
- medianBy :: (a -> a -> Ordering) -> a -> a -> a -> a
- insertionSortBy :: (MVector mv a, PrimMonad m) => (a -> a -> Ordering) -> mv (PrimState m) a -> m ()
Documentation
quickSort :: (Ord a, PrimMonad m, MVector mv a) => mv (PrimState m) a -> m () Source #
Random Pivot Quick Sort
O(n log n)
quickSortBy :: (PrimMonad m, MVector mv a) => (a -> a -> Ordering) -> mv (PrimState m) a -> m () Source #
Random Pivot Quick Sort
O(n log n)
quickSelect :: (Ord a, PrimMonad m, MVector mv a) => mv (PrimState m) a -> Int -> m a Source #
Random Pivot Quick Select
O(n)
quickSelectBy :: (PrimMonad m, MVector mv a) => (a -> a -> Ordering) -> mv (PrimState m) a -> Int -> m a Source #
Random Pivot Quick Select
O(n)
pivotPartitionBy :: (PrimMonad m, MVector mv a) => (a -> a -> Ordering) -> mv (PrimState m) a -> a -> m Int Source #
getMedian3PivotBy :: (PrimMonad m, MVector mv a) => (a -> a -> Ordering) -> mv (PrimState m) a -> m a Source #
insertionSortBy :: (MVector mv a, PrimMonad m) => (a -> a -> Ordering) -> mv (PrimState m) a -> m () Source #