Commit fd501e3d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fcdfff39
......@@ -11,12 +11,26 @@
//
// A B⁺ tree consists of nodes. Only leaf tree nodes point to data.
// Intermediate tree nodes contains keys and pointer to next-level tree nodes.
// B⁺ tree always have uniform height - that is the path to any leaf node from
// the tree root is the same. XXX
//
// BTree.Get(key) performs point-query.
// A well-balanced B⁺ tree always have uniform depth - that is the path to any
// leaf node from the tree root is the same. However historically ZODB/py does
// not always balance B⁺ trees well(*), so this property is not preserved.
// Nevertheless an intermediate B⁺ tree node always has children of the same
// kind: they are either all leafs or all intermediate nodes(+).
//
// B⁺ Trees
// BTree and Bucket represent an intermediate and a leaf tree node correspondingly.
//
// node.Get(key) performs point-query.
//
// node.{Min,Max}Key() returns key-range limit for all children/values under the node.
//
// node.Entryv() returns [] of (key, child/value).
//
// --------
//
// (*) https://github.com/zopefoundation/ZODB/blob/3.10.7-4-gb8d7a8567/src/BTrees/Development.txt#L211
//
// (+) https://github.com/zopefoundation/ZODB/blob/3.10.7-4-gb8d7a8567/src/BTrees/Development.txt#L231
package btree
//go:generate ./gen-btree IO int32 ziobtree.go
......
......@@ -2,7 +2,7 @@
# btree.go.in -> specialized with concrete types
# gen-btree KIND KEY out
# Copyright (C) 2017 Nexedi SA and Contributors.
# Copyright (C) 2018 Nexedi SA and Contributors.
# Kirill Smelkov <kirr@nexedi.com>
#
# This program is free software: you can Use, Study, Modify and Redistribute
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment