(astart, alast, bstart, blast int)
| 1387 | } |
| 1388 | |
| 1389 | func intersectWithLeftover16(astart, alast, bstart, blast int) (isOverlap, isLeftoverA, isLeftoverB bool, leftoverstart int, intersection interval16) { |
| 1390 | if !have4Overlap16(astart, alast, bstart, blast) { |
| 1391 | return |
| 1392 | } |
| 1393 | isOverlap = true |
| 1394 | |
| 1395 | // do the intersection: |
| 1396 | if bstart > astart { |
| 1397 | intersection.start = uint16(bstart) |
| 1398 | } else { |
| 1399 | intersection.start = uint16(astart) |
| 1400 | } |
| 1401 | |
| 1402 | switch { |
| 1403 | case blast < alast: |
| 1404 | isLeftoverA = true |
| 1405 | leftoverstart = blast + 1 |
| 1406 | intersection.length = uint16(blast) - intersection.start |
| 1407 | case alast < blast: |
| 1408 | isLeftoverB = true |
| 1409 | leftoverstart = alast + 1 |
| 1410 | intersection.length = uint16(alast) - intersection.start |
| 1411 | default: |
| 1412 | // alast == blast |
| 1413 | intersection.length = uint16(alast) - intersection.start |
| 1414 | } |
| 1415 | |
| 1416 | return |
| 1417 | } |
| 1418 | |
| 1419 | func (rc *runContainer16) findNextIntervalThatIntersectsStartingFrom(startIndex int, key int) (index int, done bool) { |
| 1420 | w, _, _ := rc.searchRange(key, startIndex, 0) |
no test coverage detected
searching dependent graphs…