MCPcopy Create free account
hub / github.com/RoaringBitmap/roaring / Minimum

Method Minimum

roaring.go:1043–1048  ·  view source on GitHub ↗

Minimum get the smallest value stored in this roaring bitmap, assumes that it is not empty

()

Source from the content-addressed store, hash-verified

1041
1042// Minimum get the smallest value stored in this roaring bitmap, assumes that it is not empty
1043func (rb *Bitmap) Minimum() uint32 {
1044 if len(rb.highlowcontainer.containers) == 0 {
1045 panic("Empty bitmap")
1046 }
1047 return uint32(rb.highlowcontainer.containers[0].minimum()) | (uint32(rb.highlowcontainer.keys[0]) << 16)
1048}
1049
1050// Maximum get the largest value stored in this roaring bitmap, assumes that it is not empty
1051func (rb *Bitmap) Maximum() uint32 {

Callers 2

TestMinPanicFunction · 0.45
TestFirstLastFunction · 0.45

Calls 1

minimumMethod · 0.65

Tested by 2

TestMinPanicFunction · 0.36
TestFirstLastFunction · 0.36