GetCardinality returns the number of integers contained in the bitmap
()
| 386 | |
| 387 | // GetCardinality returns the number of integers contained in the bitmap |
| 388 | func (rb *Bitmap) GetCardinality() uint64 { |
| 389 | size := uint64(0) |
| 390 | for _, c := range rb.highlowcontainer.containers { |
| 391 | size += c.GetCardinality() |
| 392 | } |
| 393 | return size |
| 394 | } |
| 395 | |
| 396 | // Rank returns the number of integers that are smaller or equal to x (Rank(infinity) would be GetCardinality()) |
| 397 | func (rb *Bitmap) Rank(x uint64) uint64 { |
no outgoing calls