Expand description
The histogram is implemented as a trie.
Each node in the trie stores a count of a key/address sharing a prefix up to depth * LEVEL_STEP
bits.
The key/address is always 64 bits.
There are branch nodes, and two types of leaf nodes: dense, and sparse. Dense leaves are only found at the very bottom of the trie.
Modulesยง
- large_
and_ ๐fast - small_
and_ ๐slow
Structsยง
- Branch
Node ๐ - Dense
Leaf ๐ - An iterator over an
Int64Histogram
. - Node
Iterator ๐ - Sparse
Leaf ๐ - Tree
Iterator ๐
Enumsยง
- Node ๐
Constantsยง
- ADDR_
MASK ๐ - MAX_
SPARSE_ ๐LEAF_ LEN When aSparseLeaf
goes over this, it becomes aBranchNode
. - NUM_
CHILDREN_ ๐IN_ NODE - NUM_
NODE_ ๐STEPS - ROOT_
LEVEL ๐
Functionsยง
- child_
level_ ๐and_ size
Type Aliasesยง
- Level ๐How high up in the tree we are (where root is highest).
1 << level
is the size of the range the next child. So1 << ROOT_LEVEL
is the size of the range of each children of the root.