public static SuffixData createWithLCP ( CharSequence s , ISuffixArrayBuilder builder ) { final CharSequenceAdapter adapter = new CharSequenceAdapter ( builder ) ; final int [ ] sa = adapter . buildSuffixArray ( s ) ; final int [ ] lcp = computeLCP ( adapter . input , 0 , s . length ( ) , sa ) ; return new SuffixData ( sa , lcp ) ; }
Create a suffix array and an LCP array for a given character sequence use the given algorithm for building the suffix array .