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

Method ToArray

roaring.go:446–450  ·  view source on GitHub ↗

ToArray creates a new slice containing all of the integers stored in the Bitmap in sorted order

()

Source from the content-addressed store, hash-verified

444
445// ToArray creates a new slice containing all of the integers stored in the Bitmap in sorted order
446func (rb *Bitmap) ToArray() []uint32 {
447 array := make([]uint32, rb.GetCardinality())
448 ar := rb.toArray(&array)
449 return *ar
450}
451
452func (rb *Bitmap) toArray(array *[]uint32) *[]uint32 {
453 pos := 0

Callers 13

TestBitmapCOWFunction · 0.95
TestCloneCOWContainersFunction · 0.95
TestBitmapFunction · 0.95
TestIterateFunction · 0.95
TestIterateCompressedFunction · 0.95
TestIterateLargeValuesFunction · 0.95
TestIterateHaltFunction · 0.95
testAddOffsetFunction · 0.45
TestArrayContainerIandFunction · 0.45
TestIssue330Function · 0.45
TestSelectAfterOptimizeFunction · 0.45

Calls 2

GetCardinalityMethod · 0.95
toArrayMethod · 0.95

Tested by 13

TestBitmapCOWFunction · 0.76
TestCloneCOWContainersFunction · 0.76
TestBitmapFunction · 0.76
TestIterateFunction · 0.76
TestIterateCompressedFunction · 0.76
TestIterateLargeValuesFunction · 0.76
TestIterateHaltFunction · 0.76
testAddOffsetFunction · 0.36
TestArrayContainerIandFunction · 0.36
TestIssue330Function · 0.36
TestSelectAfterOptimizeFunction · 0.36