Lines Matching refs:period
191 Also find the period of the right half. */
195 // The period of the right half.
196 Py_ssize_t period = 1;
209 // We've ruled out any period smaller than what's
211 period = candidate - max_suffix;
214 if (k + 1 != period) {
219 // Matched a whole period.
220 // Start matching the next period.
221 candidate += period;
230 period = 1;
233 *return_period = period;
244 where the "local period" of the cut is maximal.
246 The local period of the cut is the minimal length of a string w
251 period is the global period of the string.
260 >>> cut, period = factorize(x)
263 >>> period # right half period
265 >>> right[period:] == right[:-period]
268 This is how the local period lines up in the above example:
272 period of the original string. */
274 Py_ssize_t cut1, period1, cut2, period2, cut, period;
280 period = period1;
284 period = period2;
292 *return_period = period;
308 Py_ssize_t period;
321 p->cut = STRINGLIB(_factorize)(needle, len_needle, &(p->period));
322 assert(p->period + p->cut <= len_needle);
324 needle + p->period,
328 assert(p->cut < p->period);
332 // A lower bound on the period
333 p->period = Py_MAX(p->cut, len_needle - p->cut) + 1;
367 Py_ssize_t period = p->period;
409 window_last += period;
410 memory = len_needle - period;
435 period = Py_MAX(gap, period);
474 window_last += period;