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.
mergesort :: Ord a => [a] -> [a]tensort Data.Tensort.OtherSorts.Mergesort Takes a list and returns a sorted list using a Mergesort algorithm.
Examples
>>> mergesort ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> mergesort ([(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)]
module Data.Tensort.OtherSorts.
Quicksort This module provides an implementation of the quicksort algorithm suitable for sorting lists.
quicksort :: Ord a => [a] -> [a]tensort Data.Tensort.OtherSorts.Quicksort Takes a list and returns a sorted list using a Quicksort algorithm.
Examples
>>> quicksort ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> quicksort ([(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)]
module Data.Tensort.
Robustsort This module provides variations of the Robustsort algorithm
robustsortB :: Ord a => [Bit a] -> [Bit a]tensort Data.Tensort.Robustsort Takes a list and returns a sorted list using a Basic Mundane Robustsort algorithm with a Bogosort adjudicator
Examples
>>> robustsortB ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> robustsortB ([(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)]
robustsortM :: Ord a => [Bit a] -> [Bit a]tensort Data.Tensort.Robustsort Takes a list and returns a sorted list using a Basic Magic Robustsort algorithm
Examples
>>> robustsortM ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> robustsortM ([(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)]
robustsortP :: Ord a => [Bit a] -> [Bit a]tensort Data.Tensort.Robustsort Takes a list and returns a sorted list using a Basic Mundane Robustsort algorithm with a Permutationsort adjudicator
Examples
>>> robustsortP ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> robustsortP ([(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)]
robustsortRB :: Ord a => [Bit a] -> [Bit a]tensort Data.Tensort.Robustsort Takes a list and returns a sorted list using a Recursive Mundane Robustsort algorithm with a Bogosort adjudicator
Examples
>>> robustsortRB ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> robustsortRB ([(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)]
robustsortRCustom :: Ord a => SortAlg (Bit a) -> [Bit a] -> [Bit a]tensort Data.Tensort.Robustsort Used for making recursive Robustsort variants Takes the base SortAlg you want to use and a list and returns a sorted list. Uses a Logarithmic bytesize to determine when to stop recursing and use the base SortAlg to sort the records. Uses the base SortAlg once the bytesize is less than or equal to 27. This number is chosen because the natural logarithm of 27 is close to 3 (it's about 3.3) and the cube root of 27 is 3, so it's likely to be an efficient choice. This configuration is tailored to using a standard basic Robustsort algorithm (i.e. with a Bytesize of 3) as the base SortAlg. You're welcome to experiment with weirder setups too!
Examples
>>> robustsortRCustom robustsortB ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> robustsortRCustom robustsortB ([(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)]
robustsortRM :: Ord a => [Bit a] -> [Bit a]tensort Data.Tensort.Robustsort Takes a list and returns a sorted list using a Recursive Magic Robustsort algorithm
Examples
>>> robustsortRM ([16, 23, 4, 8, 15, 42] :: [Int]) [4,8,15,16,23,42]
>>> robustsortRM ([(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)]