MCPcopy Index your code
hub / github.com/RoaringBitmap/roaring / Maximum

Method Maximum

roaring.go:1051–1057  ·  view source on GitHub ↗

Maximum get the largest value stored in this roaring bitmap, assumes that it is not empty

()

Source from the content-addressed store, hash-verified

1049
1050// Maximum get the largest value stored in this roaring bitmap, assumes that it is not empty
1051func (rb *Bitmap) Maximum() uint32 {
1052 if len(rb.highlowcontainer.containers) == 0 {
1053 panic("Empty bitmap")
1054 }
1055 lastindex := len(rb.highlowcontainer.containers) - 1
1056 return uint32(rb.highlowcontainer.containers[lastindex].maximum()) | (uint32(rb.highlowcontainer.keys[lastindex]) << 16)
1057}
1058
1059// Contains returns true if the integer is contained in the bitmap
1060func (rb *Bitmap) Contains(x uint32) bool {

Callers 5

DenseSizeMethod · 0.95
PreviousValueMethod · 0.95
TestMaxPanicFunction · 0.45
TestFirstLastFunction · 0.45
doubleFlipInvariantFunction · 0.45

Calls 1

maximumMethod · 0.65

Tested by 3

TestMaxPanicFunction · 0.36
TestFirstLastFunction · 0.36
doubleFlipInvariantFunction · 0.36