#include <tree_map.h>
◆ relink()
template<typename Key , typename Value , typename
Compare = std::less<Key>>
◆ restructure()
template<typename Key , typename Value , typename
Compare = std::less<Key>>
Performs a trinode restructuring of Node x with its parent/grandparent. Returns the Node that becomes the root of the restructured subtree.
Assumes the nodes are in one of the following configurations:
z=a z=c z=a z=c
/ \ / \ / \ / \ t0 y=b y=b t3 t0 y=c y=a t3 / \ / \ / \ / \ t1 x=c x=a t2 x=b t3 t0 x=b / \ / \ / \ / \ t2 t3 t0 t1 t1 t2 t1 t2
The subtree will be restructured so that the node with key b becomes its root.
b
/ \
a c
/ \ / \
t0 t1 t2 t3
◆ rotate()
template<typename Key , typename Value , typename
Compare = std::less<Key>>
Rotates non-root node x above its parent. Switches between these configurations, depending on whether x=a or x=b in the following:
b a
/ \ / \
a t2 t0 b
/ \ / \
t0 t1 t1 t2
◆ sentinel()
template<typename Key , typename Value , typename
Compare = std::less<Key>>
◆ rt
template<typename Key , typename Value , typename
Compare = std::less<Key>>
◆ TreeMap
template<typename Key , typename Value , typename
Compare = std::less<Key>>
The documentation for this class was generated from the following file: