GetCardinality returns the number of integers contained in the bitmap
()
| 1245 | |
| 1246 | // GetCardinality returns the number of integers contained in the bitmap |
| 1247 | func (rb *Bitmap) GetCardinality() uint64 { |
| 1248 | size := uint64(0) |
| 1249 | for _, c := range rb.highlowcontainer.containers { |
| 1250 | size += uint64(c.getCardinality()) |
| 1251 | } |
| 1252 | return size |
| 1253 | } |
| 1254 | |
| 1255 | // Rank returns the number of integers that are smaller or equal to x (Rank(infinity) would be GetCardinality()). |
| 1256 | // If you pass the smallest value, you get the value 1. If you pass a value that is smaller than the smallest |