Maximum get the largest value stored in this roaring bitmap, assumes that it is not empty
()
| 1049 | |
| 1050 | // Maximum get the largest value stored in this roaring bitmap, assumes that it is not empty |
| 1051 | func (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 |
| 1060 | func (rb *Bitmap) Contains(x uint32) bool { |