|
|
@ -244,7 +244,7 @@ final class PatienceDiffIndex<S extends Sequence> { |
|
|
|
private void scanA() { |
|
|
|
private void scanA() { |
|
|
|
int ptr = region.beginA; |
|
|
|
int ptr = region.beginA; |
|
|
|
final int end = region.endA; |
|
|
|
final int end = region.endA; |
|
|
|
int pLast = pBegin - 1; |
|
|
|
int pLast = pBegin; |
|
|
|
SCAN: while (ptr < end) { |
|
|
|
SCAN: while (ptr < end) { |
|
|
|
final int tIdx = hash(a, ptr); |
|
|
|
final int tIdx = hash(a, ptr); |
|
|
|
|
|
|
|
|
|
|
@ -276,12 +276,7 @@ final class PatienceDiffIndex<S extends Sequence> { |
|
|
|
// fact that pCommon is sorted by B, and its likely that
|
|
|
|
// fact that pCommon is sorted by B, and its likely that
|
|
|
|
// matches in A appear in the same order as they do in B.
|
|
|
|
// matches in A appear in the same order as they do in B.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
for (int pIdx = pLast + 1;; pIdx++) { |
|
|
|
for (int pIdx = pLast;;) { |
|
|
|
if (pIdx == pEnd) |
|
|
|
|
|
|
|
pIdx = pBegin; |
|
|
|
|
|
|
|
else if (pIdx == pLast) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final long priorRec = pCommon[pIdx]; |
|
|
|
final long priorRec = pCommon[pIdx]; |
|
|
|
final int priorB = bOf(priorRec); |
|
|
|
final int priorB = bOf(priorRec); |
|
|
|
if (bs < priorB) |
|
|
|
if (bs < priorB) |
|
|
@ -291,6 +286,12 @@ final class PatienceDiffIndex<S extends Sequence> { |
|
|
|
pLast = pIdx; |
|
|
|
pLast = pIdx; |
|
|
|
continue SCAN; |
|
|
|
continue SCAN; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pIdx++; |
|
|
|
|
|
|
|
if (pIdx == pEnd) |
|
|
|
|
|
|
|
pIdx = pBegin; |
|
|
|
|
|
|
|
if (pIdx == pLast) |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|