datastructures 0.1.0
Loading...
Searching...
No Matches
_avl_common.hpp File Reference

Header for functions and classes common to all avl trees. More...

#include <cstdint>
#include <memory>
#include <type_traits>
#include "_avl_common.ipp"
Include dependency graph for _avl_common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  datastructures::detail::avl_tree_base< TKey, TItem, TKeyComp, TAlloc, TNode >
 Base class for avl trees. More...
 

Namespaces

namespace  datastructures
 Declarations of the persistent map.
 
namespace  datastructures::detail
 

Typedefs

using datastructures::detail::avl_sign_type = int8_t
 The type to use for the trinary sign value for each node.
 
template<class TNode , class TAlloc >
using datastructures::detail::avl_node_allocator_type = std::allocator_traits< TAlloc >::template rebind_alloc< TNode >
 An allocator to allocate nodes.
 
template<class TNode , class TAlloc >
using datastructures::detail::avl_node_ptr = std::allocator_traits< avl_node_allocator_type< TNode, TAlloc > >::pointer
 A node pointer type.
 

Functions

int datastructures::detail::avl_calc_max_height (size_t n)
 Returns the maximum allowed height for an AVL tree of given size.
 

Detailed Description

Header for functions and classes common to all avl trees.

Every feature that should work unmodified for both the persistent and normal AVL trees should be defined in the base class avl_tree_base. For example the memory handling with the given allocator is the exact same, so it is defined there.

Author
Matěj Smetana