Stdlib index
- Captured-borrow migration worklist (3.3.3)
- Owned-bind migration worklist (8.2.7)
- Return-side title audit — the ride-through enumeration
- stdlib ownership audit
- stdlib ownership dispositions (plan 1.3.1 / 4.3.1)
aot
codec
codec / csv
codec / json
collection
- ArrayList
- BPlusTree
- Cache
- Collectors
- HashMap
- HashSet
- Heap
- ImmutableList
- ImmutableMap
- ImmutableSet
- LinkedList
- RedBlackTree
- Sort
collection / ltm
concurrent
error
- Exception
- NoOptionalValueException
- NotProvidedException
- RecoverableException
- ScopedBuildFailedException
- ScopeNotActiveException
- Throwable
- UnrecoverableException
gfx
hash
ifx
io
io / file
io / net
io / net / dns
io / net / uri
lang
lang / stream
math
math / fft
math / linalg
math / npio
math / poly
math / random
math / stats
nucleo
- Columns — the Arrow-laid-out substrate
- Fused tensor expressions — Fuse
- Table — the lazy, typed dataframe
- Tape — define-by-run autograd
- Transform intrinsics — Grad, Vmap, Jit
process
reflect
search / distance
search / fuzzy
search / ngram
session
time
- Clock
- DateTimeFormatter
- Duration
- Instant
- LocalDate
- LocalDateTime
- LocalTime
- Period
- ZonedDateTime
- ZoneId
- ZoneOffset
wire
xpu
xpu / mesh
BPlusTree<K, V>
cajeta.collection.BPlusTree — in-memory ordered map backed by a B+ tree: all
entries live in leaves, internal nodes hold only separator keys, and leaves are
singly linked in ascending order for cheap range scans. Keys are ordered by <
/ > on K (primitive K works today; class K needs operator< /
operator>). Misses return the type’s zero value; deletion is deferred for
this in-memory tree, so it is an insert/lookup ordered map — the disk-backed
LtmBPlusTree has tombstone-based remove, ordered
scan/scanFrom cursors, and compact().
BPlusTree<int32, String> index = heap BPlusTree<int32, String>();
index.put(42, "answer");
index.put(7, "lucky");
String hit = index.get(42); // "answer"
boolean known = index.containsKey(9); // false, miss -> zero value
int32 lo = index.min(); // 7
ArrayList<int32> keys #= index.keysInOrder(); // ascending
Methods
| Signature | |
|---|---|
BPlusTree() ⚑ | Create an empty tree with a branching order of 32 |
int64 count() | Number of entries |
boolean isEmpty() | True when no entries have been inserted |
void put(K key, V value) | Insert or update the entry for key |
V get(K key) | Value bound to key, or the type’s zero value if absent |
boolean containsKey(K key) | True iff key is present |
K min() | Smallest key, or the type’s zero value if empty |
#ArrayList<K> keysInOrder() | All keys in ascending order, walking the linked leaves |
⚑ = @EntryPoint
See also
- Tour: BPlusTreeDemo
- Source:
runtime/src/cajeta/collection/BPlusTree.cajeta - RedBlackTree — the binary-search-tree ordered map
- LtmBPlusTree — the disk-backed, larger-than-memory variant
- ArrayList — backs
keysInOrder