Classes | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
grpc_core::AVL< K, V > Class Template Reference

#include <avl.h>

Classes

class  Iterator
 
struct  Node
 

Public Member Functions

AVL Add (K key, V value) const
 
 AVL ()
 
bool Empty () const
 
template<class F >
void ForEach (F &&f) const
 
template<typename SomethingLikeK >
const V * Lookup (const SomethingLikeK &key) const
 
const std::pair< K, V > * LookupBelow (const K &key) const
 
bool operator< (const AVL &other) const
 
bool operator== (const AVL &other) const
 
template<typename SomethingLikeK >
AVL Remove (const SomethingLikeK &key) const
 
bool SameIdentity (const AVL &avl) const
 

Private Types

typedef std::shared_ptr< NodeNodePtr
 

Private Member Functions

 AVL (NodePtr root)
 

Static Private Member Functions

static NodePtr AddKey (const NodePtr &node, K key, V value)
 
template<class F >
static void ForEachImpl (const Node *n, F &&f)
 
template<typename SomethingLikeK >
static NodePtr Get (const NodePtr &node, const SomethingLikeK &key)
 
static NodePtr GetBelow (const NodePtr &node, const K &key)
 
static long Height (const NodePtr &n)
 
static NodePtr InOrderHead (NodePtr node)
 
static NodePtr InOrderTail (NodePtr node)
 
static NodePtr MakeNode (K key, V value, const NodePtr &left, const NodePtr &right)
 
static NodePtr Rebalance (K key, V value, const NodePtr &left, const NodePtr &right)
 
template<typename SomethingLikeK >
static NodePtr RemoveKey (const NodePtr &node, const SomethingLikeK &key)
 
static NodePtr RotateLeft (K key, V value, const NodePtr &left, const NodePtr &right)
 
static NodePtr RotateLeftRight (K key, V value, const NodePtr &left, const NodePtr &right)
 
static NodePtr RotateRight (K key, V value, const NodePtr &left, const NodePtr &right)
 
static NodePtr RotateRightLeft (K key, V value, const NodePtr &left, const NodePtr &right)
 

Private Attributes

NodePtr root_
 

Detailed Description

template<class K, class V = void>
class grpc_core::AVL< K, V >

Definition at line 30 of file avl.h.

Member Typedef Documentation

◆ NodePtr

template<class K , class V = void>
typedef std::shared_ptr<Node> grpc_core::AVL< K, V >::NodePtr
private

Definition at line 91 of file avl.h.

Constructor & Destructor Documentation

◆ AVL() [1/2]

template<class K , class V = void>
grpc_core::AVL< K, V >::AVL ( )
inline

Definition at line 32 of file avl.h.

◆ AVL() [2/2]

template<class K , class V = void>
grpc_core::AVL< K, V >::AVL ( NodePtr  root)
inlineexplicitprivate

Definition at line 133 of file avl.h.

Member Function Documentation

◆ Add()

template<class K , class V = void>
AVL grpc_core::AVL< K, V >::Add ( key,
value 
) const
inline

Definition at line 34 of file avl.h.

◆ AddKey()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::AddKey ( const NodePtr node,
key,
value 
)
inlinestaticprivate

Definition at line 234 of file avl.h.

◆ Empty()

template<class K , class V = void>
bool grpc_core::AVL< K, V >::Empty ( ) const
inline

Definition at line 52 of file avl.h.

◆ ForEach()

template<class K , class V = void>
template<class F >
void grpc_core::AVL< K, V >::ForEach ( F &&  f) const
inline

Definition at line 55 of file avl.h.

◆ ForEachImpl()

template<class K , class V = void>
template<class F >
static void grpc_core::AVL< K, V >::ForEachImpl ( const Node n,
F &&  f 
)
inlinestaticprivate

Definition at line 136 of file avl.h.

◆ Get()

template<class K , class V = void>
template<typename SomethingLikeK >
static NodePtr grpc_core::AVL< K, V >::Get ( const NodePtr node,
const SomethingLikeK &  key 
)
inlinestaticprivate

Definition at line 152 of file avl.h.

◆ GetBelow()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::GetBelow ( const NodePtr node,
const K &  key 
)
inlinestaticprivate

Definition at line 166 of file avl.h.

◆ Height()

template<class K , class V = void>
static long grpc_core::AVL< K, V >::Height ( const NodePtr n)
inlinestaticprivate

Definition at line 143 of file avl.h.

◆ InOrderHead()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::InOrderHead ( NodePtr  node)
inlinestaticprivate

Definition at line 250 of file avl.h.

◆ InOrderTail()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::InOrderTail ( NodePtr  node)
inlinestaticprivate

Definition at line 257 of file avl.h.

◆ Lookup()

template<class K , class V = void>
template<typename SomethingLikeK >
const V* grpc_core::AVL< K, V >::Lookup ( const SomethingLikeK &  key) const
inline

Definition at line 42 of file avl.h.

◆ LookupBelow()

template<class K , class V = void>
const std::pair<K, V>* grpc_core::AVL< K, V >::LookupBelow ( const K &  key) const
inline

Definition at line 47 of file avl.h.

◆ MakeNode()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::MakeNode ( key,
value,
const NodePtr left,
const NodePtr right 
)
inlinestaticprivate

Definition at line 145 of file avl.h.

◆ operator<()

template<class K , class V = void>
bool grpc_core::AVL< K, V >::operator< ( const AVL< K, V > &  other) const
inline

Definition at line 75 of file avl.h.

◆ operator==()

template<class K , class V = void>
bool grpc_core::AVL< K, V >::operator== ( const AVL< K, V > &  other) const
inline

Definition at line 61 of file avl.h.

◆ Rebalance()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::Rebalance ( key,
value,
const NodePtr left,
const NodePtr right 
)
inlinestaticprivate

Definition at line 214 of file avl.h.

◆ Remove()

template<class K , class V = void>
template<typename SomethingLikeK >
AVL grpc_core::AVL< K, V >::Remove ( const SomethingLikeK &  key) const
inline

Definition at line 38 of file avl.h.

◆ RemoveKey()

template<class K , class V = void>
template<typename SomethingLikeK >
static NodePtr grpc_core::AVL< K, V >::RemoveKey ( const NodePtr node,
const SomethingLikeK &  key 
)
inlinestaticprivate

Definition at line 265 of file avl.h.

◆ RotateLeft()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::RotateLeft ( key,
value,
const NodePtr left,
const NodePtr right 
)
inlinestaticprivate

Definition at line 179 of file avl.h.

◆ RotateLeftRight()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::RotateLeftRight ( key,
value,
const NodePtr left,
const NodePtr right 
)
inlinestaticprivate

Definition at line 194 of file avl.h.

◆ RotateRight()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::RotateRight ( key,
value,
const NodePtr left,
const NodePtr right 
)
inlinestaticprivate

Definition at line 187 of file avl.h.

◆ RotateRightLeft()

template<class K , class V = void>
static NodePtr grpc_core::AVL< K, V >::RotateRightLeft ( key,
value,
const NodePtr left,
const NodePtr right 
)
inlinestaticprivate

Definition at line 204 of file avl.h.

◆ SameIdentity()

template<class K , class V = void>
bool grpc_core::AVL< K, V >::SameIdentity ( const AVL< K, V > &  avl) const
inline

Definition at line 59 of file avl.h.

Member Data Documentation

◆ root_

template<class K , class V = void>
NodePtr grpc_core::AVL< K, V >::root_
private

Definition at line 105 of file avl.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:35