-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | n log n implementation of suffix array.
--
-- n log n implementation of suffix array.
@package suffixarray
@version 0.0.3.1
module Data.CountingSort
countingSort :: (Ix a, Ord a, Bounded a) => Vector a -> Vector Int -> Vector Int
iforeachr :: (Ix a, Ord a, Bounded a) => Vector a -> (Int -> a -> IO ()) -> IO ()
partialSums :: Vector Int -> Vector Int
countOccurences :: (Ix a, Ord a, Bounded a) => Vector a -> Vector Int
-- | Construction of suffix arrays (arrays ordered by suffix). Given an
-- array d elements, the suffix array is a sorted array of the
-- sub-arrays in d. For instance, the suffix array of banana
-- apple pear apple is:
--
--
-- - apple
-- - apple pear apple
-- - banana apple pear apple
-- - pear apple
--
module Data.SuffixArray
data SuffixArray a
SuffixArray :: (Vector a) -> (Vector Int) -> SuffixArray a
-- | Generate a suffix array as list.
suffixArray :: (Ix a, Ord a, Bounded a) => Vector a -> SuffixArray a
simpleEquator :: (Ix a, Ord a, Bounded a) => Vector a -> Vector Int -> Equator
fancyEquator :: (Ix a, Ord a, Bounded a) => Vector a -> Vector Int -> Int -> Int -> Equator
shiftList :: Int -> Int -> Vector Int -> Vector Int
-- |
-- - Build composition of two lists. First argument is source list. -
-- Second argument is vector of indexes. Elements of first list should -
-- be reordered accordingly to indexes in the second argument.
--
composeLists :: Vector Int -> Vector Int -> Vector Int
populateClassesBy :: Equator -> Vector Int -> Vector Int
-- | fromList constructs a suffix array from a list of elements.
fromList :: (Ix a, Ord a, Bounded a) => [a] -> SuffixArray a
-- | toList constructs a list from a suffix array.
toList :: SuffixArray a -> [[a]]
-- | elems provides a vector of each element in the suffix array.
-- One element of the suffix array contains the full data array.
elems :: SuffixArray a -> Vector (Vector a)
instance Show a => Show (SuffixArray a)