Low-level implementation of the size-bounded tree #
This file contains the basic definition implementing the functionality of the size-bounded trees.
(Implementation detail) The actual inductive type for the size-balanced tree data structure.
Equations
The "delta" parameter of the size-bounded tree. Controls how imbalanced the tree can be.
Equations
The "ratio" parameter of the size-bounded tree. Controls how aggressive the rebalancing operations are.
Equations
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
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