Lines Matching defs:shift
58 // Cap on the maximal shift in the Boyer-Moore implementation. By setting a
74 // Bad-char shift table stored in the state. It's length is the alphabet size.
79 // Store for the BoyerMoore(Horspool) bad char shift table.
81 // Store for the BoyerMoore good suffix shift table.
84 // shift table.
354 int shift = j - CharOccurrence(bad_char_occurrence, c);
355 index += shift;
368 // Fall back on BMH shift.
374 int shift = j - bc_occ;
375 if (gs_shift > shift) {
376 shift = gs_shift;
378 index += shift;
437 // Build shift table using suffixes.
476 int shift = j - bc_occ;
477 index += shift;
478 badness += 1 - shift; // at most zero, so badness cannot increase.