|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
The search path of a balanced tree holds the head node and then up to Node::MaxHeight nodes, so a tree as tall as MaxHeight can be updated at its deepest level.
More...
#include <gtest/gtest.h>#include <memory>#include <vector>#include <tpl_avl.H>#include <tpl_binNodeUtils.H>#include <tpl_rb_tree.H>Go to the source code of this file.
Classes | |
| class | Short_AvlNode< Key > |
| class | Short_AvlNodeVtl< Key > |
| class | Short_RbNode< Key > |
| class | Short_RbNodeVtl< Key > |
Functions | |
| TEST (TreePathCapacity, AvlTreeAsTallAsMaxHeight) | |
| TEST (TreePathCapacity, RbTreeAsTallAsMaxHeight) | |
The search path of a balanced tree holds the head node and then up to Node::MaxHeight nodes, so a tree as tall as MaxHeight can be updated at its deepest level.
The trees are built on nodes with a MaxHeight of 4, which 15 keys fill. Removing a leaf at depth 3 builds a path of 5 entries: before the path reserved a slot for the head node, the last push overflowed it (a Debug assertion, a write past the inline storage otherwise).
Definition in file tree_path_capacity_test.cc.
| TEST | ( | TreePathCapacity | , |
| AvlTreeAsTallAsMaxHeight | |||
| ) |
Definition at line 83 of file tree_path_capacity_test.cc.
References Aleph::computeHeightRec(), QuadTree::insert(), level_order(), QuadTree::remove(), and Aleph::size().
| TEST | ( | TreePathCapacity | , |
| RbTreeAsTallAsMaxHeight | |||
| ) |
Definition at line 103 of file tree_path_capacity_test.cc.
References Aleph::computeHeightRec(), QuadTree::insert(), level_order(), and QuadTree::remove().