Hoogle Search

Within LTS Haskell 24.33 (ghc-9.10.3)

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

  1. module Data.Tensort.Subalgorithms.Permutationsort

    This module provides the permutationsort function for sorting lists

  2. permutationsort :: Ord a => [a] -> [a]

    tensort Data.Tensort.Subalgorithms.Permutationsort

    Takes a list and returns a sorted list using Permutationsort algorithm

    Examples

    >>> permutationsort ([16, 23, 4, 8, 15, 42] :: [Int])
    [4,8,15,16,23,42]
    
    >>> permutationsort ([(1, 16), (5, 23), (2, 4) ,(3, 8), (0, 15) , (4, 42)] :: [(Int, Int)])
    [(0,15),(1,16),(2,4),(3,8),(4,42),(5,23)]
    

  3. module Data.Tensort.Subalgorithms.Rotationsort

    This module provides Rotationsort variants for sorting lists. | I was having some issues with the swaps for larger input lists, so for now these functions are only implemented for lists of length 3 or less.

  4. rotationsort :: Ord a => [a] -> [a]

    tensort Data.Tensort.Subalgorithms.Rotationsort

    Takes a list and returns a sorted list using a Rotationsort algorithm. I was having some issues with the swaps for larger input lists, so for now this function is only implemented for lists of length 3 or less.

    Examples

    >>> rotationsort ([1,3,2] :: [Int])
    [1,2,3]
    
    >>> rotationsort ([(3, 1), (1, 3), (2, 2)] :: [(Int, Int)])
    [(1,3),(2,2),(3,1)]
    

  5. rotationsortAmbi :: Ord a => [a] -> [a]

    tensort Data.Tensort.Subalgorithms.Rotationsort

    Takes a list and returns a sorted list using an Ambidextrous Rotationsort algorithm. I was having some issues with the swaps for larger input lists, so for now this function is only implemented for lists of length 3 or less.

    Examples

    >>> rotationsortAmbi ([1,3,2] :: [Int])
    [1,2,3]
    
    >>> rotationsortAmbi ([(3, 1), (1, 3), (2, 2)] :: [(Int, Int)])
    [(1,3),(2,2),(3,1)]
    

  6. rotationsortReverse :: Ord a => [a] -> [a]

    tensort Data.Tensort.Subalgorithms.Rotationsort

    Takes a list and returns a sorted list using a Reverse Rotationsort algorithm. I was having some issues with the swaps for larger input lists, so for now this function is only implemented for lists of length 3 or less.

    Examples

    >>> rotationsortReverse ([1,3,2] :: [Int])
    [1,2,3]
    
    >>> rotationsortReverse ([(3, 1), (1, 3), (2, 2)] :: [(Int, Int)])
    [(1,3),(2,2),(3,1)]
    

  7. rotationsortReverseAmbi :: Ord a => [a] -> [a]

    tensort Data.Tensort.Subalgorithms.Rotationsort

    Takes a list and returns a sorted list using an Ambidextrous Reverse Rotationsort algorithm. I was having some issues with the swaps for larger input lists, so for now this function is only implemented for lists of length 3 or less.

    Examples

    >>> rotationsortReverseAmbi ([1,3,2] :: [Int])
    [1,2,3]
    
    >>> rotationsortReverseAmbi ([(3, 1), (1, 3), (2, 2)] :: [(Int, Int)])
    [(1,3),(2,2),(3,1)]
    

  8. module Data.Tensort.Subalgorithms.Supersort

    This module provides functions for creating Supersort variants for adjudicating between 3 sorting algorithms.

  9. supersort :: Ord a => (SortAlg a, SortAlg a, SortAlg a, SupersortStrat a) -> [a] -> [a]

    tensort Data.Tensort.Subalgorithms.Supersort

    Used for creating a Supersort algorithm that adjudicates between 3 sorting algorithms. Takes 3 sorting algorithms and a SuperStrat and returns a SortAlg that adjudicates between the 3 sorting algorithms using the provided SuperStrat.

    Examples

    >>> import Data.Tensort.Subalgorithms.Bubblesort (bubblesort)
    
    >>> import Data.Tensort.Subalgorithms.Permutationsort (permutationsort)
    
    >>> import Data.Tensort.OtherSorts.Mergesort (mergesort)
    
    >>> supersort (mergesort, bubblesort, permutationsort, mundaneSuperStrat) ([16, 23, 4, 8, 15, 42] :: [Int])
    [4,8,15,16,23,42]
    
    >>> supersort (mergesort, bubblesort, permutationsort, mundaneSuperStrat) ([(16, 23), (4, 8), (15, 42)] :: [(Int, Int)])
    [(4,8),(15,42),(16,23)]
    

  10. module Data.Tensort.Tensort

    This module provides variations of the Tensort algorithm

Page 216 of many | Previous | Next