Red-Black Tree
Provides a pure-Oz implementation of a sorted associative container.
The underlying red-black tree allows for log(n) element access,
constant time neighborhood exploration etc. By default, the keys must be mutually comparable using Value.'<', otherwise one can specify a custom key comparator when the tree is created.
The implementation provides similar interface as e.g. the standard Dictionary module. In addition to the standard interface, there are RB-tree specific functions. See the module source code for further info (the exported functions are documented in Javadocs style).
WARNING: this data structure is *NOT THREAD-SAFE*, i.e. concurrent access might cause undesired effects. Synchronization is available as a compilation flag ("LOCKING"), but this is not usable in nested spaces, where this causes situatedness violation. Therefore, access from multiple threads needs external synchronization. Note however, that concurrent access that does not change the *keys* of the tree is guaranteed to be thread-safe.