void mergeRegions(Candidate other) { // regionList is always sorted by resultStart. Merge join two // linked lists, preserving the ordering. Combine neighboring // regions to reduce the number of results seen by callers. Region a = clearRegionList(); Region b = other.clearRegionList(); Region t = null; while (a != null && b != null) { if (a.resultStart < b.resultStart) { Region n = a.next; t = add(t, this, a); a = n; } else { Region n = b.next; t = add(t, this, b); b = n; } } if (a != null) { Region n = a.next; t = add(t, this, a); t.next = n; } else /* b != null */{ Region n = b.next; t = add(t, this, b); t.next = n; } }
toInsert.add(SEEN);
aTail = add(aTail, a, r); r = next; continue; aTail = add(aTail, a, r.splitFirst(e.getBeginA() - d, d)); r.slideAndShrink(d); if (rEnd <= e.getEndB()) { Region next = r.next; bTail = add(bTail, b, r); r = next; if (rEnd == e.getEndB()) bTail = add(bTail, b, r.splitFirst(r.sourceStart, len)); r.slideAndShrink(len); eIdx++;
void mergeRegions(Candidate other) { // regionList is always sorted by resultStart. Merge join two // linked lists, preserving the ordering. Combine neighboring // regions to reduce the number of results seen by callers. Region a = clearRegionList(); Region b = other.clearRegionList(); Region t = null; while (a != null && b != null) { if (a.resultStart < b.resultStart) { Region n = a.next; t = add(t, this, a); a = n; } else { Region n = b.next; t = add(t, this, b); b = n; } } if (a != null) { Region n = a.next; t = add(t, this, a); t.next = n; } else /* b != null */{ Region n = b.next; t = add(t, this, b); t.next = n; } }
void mergeRegions(Candidate other) { // regionList is always sorted by resultStart. Merge join two // linked lists, preserving the ordering. Combine neighboring // regions to reduce the number of results seen by callers. Region a = clearRegionList(); Region b = other.clearRegionList(); Region t = null; while (a != null && b != null) { if (a.resultStart < b.resultStart) { Region n = a.next; t = add(t, this, a); a = n; } else { Region n = b.next; t = add(t, this, b); b = n; } } if (a != null) { Region n = a.next; t = add(t, this, a); t.next = n; } else /* b != null */{ Region n = b.next; t = add(t, this, b); t.next = n; } }
toInsert.add(SEEN);
aTail = add(aTail, a, r); r = next; continue; aTail = add(aTail, a, r.splitFirst(e.getBeginA() - d, d)); r.slideAndShrink(d); if (rEnd <= e.getEndB()) { Region next = r.next; bTail = add(bTail, b, r); r = next; if (rEnd == e.getEndB()) bTail = add(bTail, b, r.splitFirst(r.sourceStart, len)); r.slideAndShrink(len); eIdx++;
toInsert.add(SEEN);
aTail = add(aTail, a, r); r = next; continue; aTail = add(aTail, a, r.splitFirst(e.getBeginA() - d, d)); r.slideAndShrink(d); if (rEnd <= e.getEndB()) { Region next = r.next; bTail = add(bTail, b, r); r = next; if (rEnd == e.getEndB()) bTail = add(bTail, b, r.splitFirst(r.sourceStart, len)); r.slideAndShrink(len); eIdx++;