previousAbsentValue will return the previous absent value If the target is in the interior of a run then then the start of the range minus 1 will be returned Example: If our run structure resmembles [[x,z], [a,c], [d,f]] with a <= target <= c then a-1 will be returned. if the target < x then targe
(target uint16)
| 2921 | // if the target < x then target is returned |
| 2922 | // if target > f then target is returned |
| 2923 | func (rc *runContainer16) previousAbsentValue(target uint16) int { |
| 2924 | whichIndex, alreadyPresent, _ := rc.search(int(target)) |
| 2925 | |
| 2926 | if !alreadyPresent { |
| 2927 | return int(target) |
| 2928 | } |
| 2929 | |
| 2930 | return int(rc.iv[whichIndex].start) - 1 |
| 2931 | } |
| 2932 | |
| 2933 | // isNonContiguousDisjoint returns an error if the intervals overlap e.g have non-empty intersection |
| 2934 | func isNonContiguousDisjoint(outer interval16, inner interval16) error { |