SuffixStructures-0.0.1.0: Suffix array construction

Safe HaskellNone
LanguageHaskell2010

Data.SuffixStructure.NaiveArray

Description

TODO need to check performance of drop vs unsafeDrop

TODO use Word instead of Int -- but check performance due to all those conversions

Synopsis

Documentation

genSA :: (ListLike ll a, Ord ll, Eq a) => ll -> SA Source

Create Suffix Array via Introsort

genSAaf :: (ListLike ll a, Ord ll, Lexicographic ll, Eq a) => ll -> SA Source

Create Suffix Array via American Flag sort

buildLCP :: (ListLike ll a, Eq a) => ll -> Vector Int -> (Vector Int8, IntMap Int) Source

Build LCP array

commonPrefix :: (ListLike ll a, Eq a) => ll -> ll -> ll Source

Return the shared prefix of two strings.

commonPrefixLength :: (ListLike ll a, Eq a) => ll -> ll -> Int Source

Return the length of the common prefix.