Low-level implementation of the size-bounded tree #
This file contains the basic definition implementing the functionality of the size-bounded trees.
Equations
Instances For
The "delta" parameter of the size-bounded tree. Controls how imbalanced the tree can be.
Equations
Instances For
The "ratio" parameter of the size-bounded tree. Controls how aggressive the rebalancing operations are.
Equations
Instances For
size #
In contrast to other functions, size is defined here because it is required to define the
Balanced predicate (see Std.Data.DTreeMap.Internal.Balanced).
The size information stored in the tree.
Equations
- (Std.DTreeMap.Internal.Impl.inner sz k v l r).size = sz
- Std.DTreeMap.Internal.Impl.leaf.size = 0
Instances For
toListModel #
toListModel is defined here because it is required to define the Ordered predicate.
Flattens a tree into a list of key-value pairs. This function is defined for verification purposes and should not be executed because it is very inefficient.
Equations
- Std.DTreeMap.Internal.Impl.leaf.toListModel = []
- (Std.DTreeMap.Internal.Impl.inner size k v l r).toListModel = l.toListModel ++ ⟨k, v⟩ :: r.toListModel
Instances For
Computes the size of the tree. Used for verification of iterators.
Equations
- Std.DTreeMap.Internal.Impl.leaf.treeSize = 0
- (Std.DTreeMap.Internal.Impl.inner size k v l r).treeSize = 1 + l.treeSize + r.treeSize