module AVL_MonoSet:
This functor is similar to the Reins.AVLSet.MonoSet
module above,
except it allows the user to specify the maximum difference
between the heights of two subtrees at a node with HeightDiff.v
.
The choice of this value affects the amount of effort spent
rebalancing the tree after it has been modified in exchange for
the cost of locating a particular element in the tree. The
modules Reins.AVLSet.MonoSet1
, Reins.AVLSet.MonoSet2
, and
Reins.AVLSet.MonoSet3
below instantiate this functor with the values
1, 2, and 3 respectively. Those modules are also defined in the
same compilation unit as the implementation code, so the value of
HeightDiff.v is inlined, increasing performance.
Parameters: |
HeightDiff |
: |
sig val v : int end
|
|
type
t
type
elt
type
cursor
type 'a
result
include Reins.Sets.Set_
val to_string : 'a set -> string