private int computeDiffDepthBucket_SaBucket ( int leftPtr , int rightPtr , int offset , int q ) { int lcp = offset ; while ( true ) { int runPtr = leftPtr ; int a = suffixArray [ rightPtr ] ; int tmpPtr = sufPtrMap [ a + lcp ] ; while ( runPtr < rightPtr ) { if ( sufPtrMap [ suffixArray [ runPtr ] + lcp ] != tmpPtr ) { return lcp ; } runPtr ++ ; } lcp += q ; } }
Computes about the LCP of all suffixes in this bucket . It will be the newoffset .