Hoogle Search
Within LTS Haskell 24.4 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
vector-algorithms Data.Vector.Algorithms.Intro Sorts an entire array using a custom ordering returning a vector of the unique elements.
sortBy :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> m ()vector-algorithms Data.Vector.Algorithms.Merge Sorts an array using a custom comparison.
sortUniq :: (PrimMonad m, MVector v e, Ord e) => v (PrimState m) e -> m (v (PrimState m) e)vector-algorithms Data.Vector.Algorithms.Merge A variant on sort that returns a vector of unique elements.
-
vector-algorithms Data.Vector.Algorithms.Merge A variant on sortBy which returns a vector of unique elements.
-
vector-algorithms Data.Vector.Algorithms.Optimal Sorts the elements at the two given indices using the comparison. This is essentially a compare-and-swap, although the first index is assumed to be the lower of the two.
sort2ByOffset :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> Int -> m ()vector-algorithms Data.Vector.Algorithms.Optimal Sorts the elements at the positions off and 'off + 1' in the given array using the comparison.
-
vector-algorithms Data.Vector.Algorithms.Optimal Sorts the elements at the three given indices. The indices are assumed to be given from lowest to highest, so if 'l < m < u' then 'sort3ByIndex cmp a m l u' essentially sorts the median of three into the lowest position in the array.
sort3ByOffset :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> Int -> m ()vector-algorithms Data.Vector.Algorithms.Optimal Sorts the three elements starting at the given offset in the array.
-
vector-algorithms Data.Vector.Algorithms.Optimal Sorts the elements at the four given indices. Like the 2 and 3 element versions, this assumes that the indices are given in increasing order, so it can be used to sort medians into particular positions and so on.
sort4ByOffset :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> Int -> m ()vector-algorithms Data.Vector.Algorithms.Optimal Sorts the four elements beginning at the offset.