--
$ylim;
} if ($xoff ==
$xlim ||
$yoff ==
$ylim) { $lcs = 0;
} else { // This is ad hoc but seems to work well.
//$nchunks = sqrt(min($xlim - $xoff, $ylim - $yoff) / 2.5);
//$nchunks = max(2, min(8, (int)$nchunks));
$nchunks =
min(7,
$xlim -
$xoff,
$ylim -
$yoff) + 1;
[$lcs,
$seps] =
$this->
_diag($xoff,
$xlim,
$yoff,
$ylim,
$nchunks);
} if ($lcs == 0
) { // X and Y sequences have no common subsequence:
// mark all changed.
while ($yoff <
$ylim) { $this->ychanged
[$this->yind
[$yoff++
]] = 1;
} while ($xoff <
$xlim) { $this->xchanged
[$this->xind
[$xoff++
]] = 1;
} }