public static < T > SuffixData createWithLCP ( T [ ] input , ISuffixArrayBuilder builder , Comparator < ? super T > comparator ) { final GenericArrayAdapter adapter = new GenericArrayAdapter ( builder , comparator ) ; final int [ ] sa = adapter . buildSuffixArray ( input ) ; final int [ ] lcp = computeLCP ( adapter . input , 0 , input . length , sa ) ; return new SuffixData ( sa , lcp ) ; }
Create a suffix array and an LCP array for a given generic array and a custom suffix array building strategy using the given T object comparator .