Hoogle Search

Within LTS Haskell 24.34 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. 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.

  2. sort3ByIndex :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> Int -> Int -> Int -> m ()

    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.

  3. 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.

  4. sort4ByIndex :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> Int -> Int -> Int -> Int -> m ()

    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.

  5. 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.

  6. sortBy :: (PrimMonad m, MVector v e) => Int -> Int -> (Int -> e -> Int) -> v (PrimState m) e -> m ()

    vector-algorithms Data.Vector.Algorithms.Radix

    Radix sorts an array using custom radix information requires the number of passes to fully sort the array, the size of of auxiliary arrays necessary (should be one greater than the maximum value returned by the radix function), and a radix function, which takes the pass and an element, and returns the relevant radix.

  7. sortBy :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> m ()

    vector-algorithms Data.Vector.Algorithms.Tim

    Sorts an array using a custom comparison.

  8. sortUniq :: (PrimMonad m, MVector v e, Ord e) => v (PrimState m) e -> m (v (PrimState m) e)

    vector-algorithms Data.Vector.Algorithms.Tim

    A variant on sort that returns a vector of unique elements.

  9. sortUniqBy :: (PrimMonad m, MVector v e) => Comparison e -> v (PrimState m) e -> m (v (PrimState m) e)

    vector-algorithms Data.Vector.Algorithms.Tim

    A variant on sortBy which returns a vector of unique elements.

  10. sortBy :: SemiSequence seq => (Element seq -> Element seq -> Ordering) -> seq -> seq

    mono-traversable Data.Sequences

    Sort a sequence using an supplied element ordering function.

    > let compare' x y = case compare x y of LT -> GT; EQ -> EQ; GT -> LT
    > sortBy compare' [5,3,6,1,2,4]
    [6,5,4,3,2,1]
    

Page 20 of many | Previous | Next