roaring · API

roaring.bitmap32

Bitmap32 — a Roaring bitmap over UInt32 values: a sorted set of 16-bit-keyed Containers, one per distinct high-16-bits key present.

Structs

Bitmap32

struct Bitmap32

Implements Copyable, Movable

Fields
containers: Dict[UInt16, Container]

__init__

def __init__(out self)

add

def add(mut self, v: UInt32)

add_range

def add_range(mut self, start: UInt32, stop: UInt32)

Add every value in [start, stop).

remove

def remove(mut self, v: UInt32)

run_optimize

def run_optimize(mut self)

contains

def contains(self, v: UInt32) -> Bool

cardinality

def cardinality(self) -> Int

is_empty

def is_empty(self) -> Bool

min

def min(self) -> UInt32

max

def max(self) -> UInt32

to_list

def to_list(self) -> List[UInt32]

or_

def or_(a, b: Self) -> Self

and_

def and_(a, b: Self) -> Self

and_not

def and_not(a, b: Self) -> Self

xor

def xor(a, b: Self) -> Self

serialize_portable

def serialize_portable(self) -> List[UInt8]

portable_size

def portable_size(self) -> Int

deserialize_portable

def deserialize_portable[origin: Origin[mut=origin.mut], //](data: Span[UInt8, origin]) -> Self