MCPcopy
hub / github.com/RoaringBitmap/roaring / rangeOfOnes

Function rangeOfOnes

roaringarray.go:105–119  ·  view source on GitHub ↗

careful: range is [firstOfRange,lastOfRange]

(start, last int)

Source from the content-addressed store, hash-verified

103
104// careful: range is [firstOfRange,lastOfRange]
105func rangeOfOnes(start, last int) container {
106 if start > MaxUint16 {
107 panic("rangeOfOnes called with start > MaxUint16")
108 }
109 if last > MaxUint16 {
110 panic("rangeOfOnes called with last > MaxUint16")
111 }
112 if start < 0 {
113 panic("rangeOfOnes called with start < 0")
114 }
115 if last < 0 {
116 panic("rangeOfOnes called with last < 0")
117 }
118 return newRunContainer16Range(uint16(start), uint16(last)).toEfficientContainer()
119}
120
121type roaringArray struct {
122 keys []uint16

Callers 3

FlipMethod · 0.85
AddRangeMethod · 0.85
FlipFunction · 0.85

Calls 2

newRunContainer16RangeFunction · 0.85
toEfficientContainerMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…