CCTLib
Calling-context and data-object attribution library for Intel Pin
RBTree< K, V, S > Class Template Reference

#include <rbtree.h>

Public Member Functions

 RBTree ()
 
TNKVInsertBST (TNKV *newNode)
 
TNKVFindSumGreaterEqual (K key, S *sum)
 
TNKVFindSumGreaterThan (K key, S *sum)
 
void UpdateSum (TNKV *node)
 
COLOR GetColor (TNKV *const node)
 
void SetColor (TNKV *node, COLOR color)
 
COLOR GetColorUnconditional (TNKV *const node)
 
void SetColorUnconditional (TNKV *node, COLOR color)
 
void RotateLeft (TNKV *p)
 
void RotateRightThenLeft (TNKV *x)
 
void RotateRight (TNKV *p)
 
void RotateLeftThenRight (TNKV *x)
 
void BalanceInsertion (TNKV *x)
 
void Insert (TNKV *newNode)
 
void BalanceDeletion (TNKV *node)
 
TNKVDeleteHelper (TNKV *node)
 
TNKVWhichNodeToDelete (TNKV *node)
 
TNKVDelete (TNKV *node)
 
bool IsBSTHelper (TNKV *node)
 
bool IsBST ()
 
bool IsSumCorrectHeler (TNKV *node, V &curSum)
 
bool IsSumCorrect ()
 
bool IsTreeCorrectHeler (TNKV *node)
 
bool IsTreeCorrect ()
 
bool IsReachableHelper (TNKV *root, TNKV *target)
 
bool IsReachable (TNKV *target)
 
GetTotalSum ()
 
TNKVFindNodeAtRankFromRight (S capacity)
 

Private Types

using TNKV = TreeNode< K, V, S >
 

Private Attributes

TreeNode< K, V, S > * root
 

Detailed Description

template<class K, class V, class S>
class RBTree< K, V, S >

Definition at line 31 of file rbtree.h.

Member Typedef Documentation

◆ TNKV

template<class K , class V , class S >
using RBTree< K, V, S >::TNKV = TreeNode<K, V, S>
private

Definition at line 32 of file rbtree.h.

Constructor & Destructor Documentation

◆ RBTree()

template<class K , class V , class S >
RBTree< K, V, S >::RBTree ( )
inline

Definition at line 38 of file rbtree.h.

Member Function Documentation

◆ BalanceDeletion()

◆ BalanceInsertion()

◆ Delete()

◆ DeleteHelper()

template<class K , class V , class S >
TNKV* RBTree< K, V, S >::DeleteHelper ( TNKV node)
inline

◆ FindNodeAtRankFromRight()

template<class K , class V , class S >
TNKV* RBTree< K, V, S >::FindNodeAtRankFromRight ( capacity)
inline

◆ FindSumGreaterEqual()

template<class K , class V , class S >
TNKV* RBTree< K, V, S >::FindSumGreaterEqual ( key,
S *  sum 
)
inline

◆ FindSumGreaterThan()

template<class K , class V , class S >
TNKV* RBTree< K, V, S >::FindSumGreaterThan ( key,
S *  sum 
)
inline

◆ GetColor()

template<class K , class V , class S >
COLOR RBTree< K, V, S >::GetColor ( TNKV *const  node)
inline

Definition at line 128 of file rbtree.h.

References BLACK, and TreeNode< K, V, S >::color.

Referenced by RBTree< K, V, S >::BalanceDeletion().

◆ GetColorUnconditional()

template<class K , class V , class S >
COLOR RBTree< K, V, S >::GetColorUnconditional ( TNKV *const  node)
inline

Definition at line 141 of file rbtree.h.

References TreeNode< K, V, S >::color.

Referenced by RBTree< K, V, S >::BalanceDeletion().

◆ GetTotalSum()

template<class K , class V , class S >
S RBTree< K, V, S >::GetTotalSum ( )
inline

Definition at line 777 of file rbtree.h.

References RBTree< K, V, S >::root.

Referenced by CheckEvictions().

◆ Insert()

template<class K , class V , class S >
void RBTree< K, V, S >::Insert ( TNKV newNode)
inline

◆ InsertBST()

◆ IsBST()

template<class K , class V , class S >
bool RBTree< K, V, S >::IsBST ( )
inline

◆ IsBSTHelper()

template<class K , class V , class S >
bool RBTree< K, V, S >::IsBSTHelper ( TNKV node)
inline

◆ IsReachable()

template<class K , class V , class S >
bool RBTree< K, V, S >::IsReachable ( TNKV target)
inline

Definition at line 773 of file rbtree.h.

References RBTree< K, V, S >::IsReachableHelper(), and RBTree< K, V, S >::root.

◆ IsReachableHelper()

template<class K , class V , class S >
bool RBTree< K, V, S >::IsReachableHelper ( TNKV root,
TNKV target 
)
inline

Definition at line 757 of file rbtree.h.

References RBTree< K, V, S >::root.

Referenced by RBTree< K, V, S >::IsReachable().

◆ IsSumCorrect()

template<class K , class V , class S >
bool RBTree< K, V, S >::IsSumCorrect ( )
inline

◆ IsSumCorrectHeler()

template<class K , class V , class S >
bool RBTree< K, V, S >::IsSumCorrectHeler ( TNKV node,
V &  curSum 
)
inline

◆ IsTreeCorrect()

template<class K , class V , class S >
bool RBTree< K, V, S >::IsTreeCorrect ( )
inline

◆ IsTreeCorrectHeler()

template<class K , class V , class S >
bool RBTree< K, V, S >::IsTreeCorrectHeler ( TNKV node)
inline

◆ RotateLeft()

template<class K , class V , class S >
void RBTree< K, V, S >::RotateLeft ( TNKV p)
inline

◆ RotateLeftThenRight()

template<class K , class V , class S >
void RBTree< K, V, S >::RotateLeftThenRight ( TNKV x)
inline

◆ RotateRight()

template<class K , class V , class S >
void RBTree< K, V, S >::RotateRight ( TNKV p)
inline

◆ RotateRightThenLeft()

template<class K , class V , class S >
void RBTree< K, V, S >::RotateRightThenLeft ( TNKV x)
inline

◆ SetColor()

template<class K , class V , class S >
void RBTree< K, V, S >::SetColor ( TNKV node,
COLOR  color 
)
inline

Definition at line 135 of file rbtree.h.

References TreeNode< K, V, S >::color.

Referenced by RBTree< K, V, S >::BalanceDeletion().

◆ SetColorUnconditional()

template<class K , class V , class S >
void RBTree< K, V, S >::SetColorUnconditional ( TNKV node,
COLOR  color 
)
inline

◆ UpdateSum()

◆ WhichNodeToDelete()

template<class K , class V , class S >
TNKV* RBTree< K, V, S >::WhichNodeToDelete ( TNKV node)
inline

Member Data Documentation

◆ root


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