LLVM 22.0.0git
|
#include "llvm/ADT/ImmutableSet.h"
Public Types | |
using | key_type_ref = typename ImutInfo::key_type_ref |
using | value_type = typename ImutInfo::value_type |
using | value_type_ref = typename ImutInfo::value_type_ref |
using | Factory = ImutAVLFactory<ImutInfo> |
using | iterator = ImutAVLTreeInOrderIterator<ImutInfo> |
Public Member Functions | |
ImutAVLTree * | getLeft () const |
Return a pointer to the left subtree. | |
ImutAVLTree * | getRight () const |
Return a pointer to the right subtree. | |
unsigned | getHeight () const |
getHeight - Returns the height of the tree. | |
const value_type & | getValue () const |
getValue - Returns the data value associated with the tree node. | |
ImutAVLTree * | find (key_type_ref K) |
find - Finds the subtree associated with the specified key value. | |
ImutAVLTree * | getMaxElement () |
getMaxElement - Find the subtree associated with the highest ranged key value. | |
unsigned | size () const |
size - Returns the number of nodes in the tree, which includes both leaves and non-leaf nodes. | |
iterator | begin () const |
begin - Returns an iterator that iterates over the nodes of the tree in an inorder traversal. | |
iterator | end () const |
end - Returns an iterator for the tree that denotes the end of an inorder traversal. | |
bool | isElementEqual (value_type_ref V) const |
bool | isElementEqual (const ImutAVLTree *RHS) const |
bool | isEqual (const ImutAVLTree &RHS) const |
isEqual - Compares two trees for structural equality and returns true if they are equal. | |
bool | isNotEqual (const ImutAVLTree &RHS) const |
isNotEqual - Compares two trees for structural inequality. | |
bool | contains (key_type_ref K) |
contains - Returns true if this tree contains a subtree (node) that has an data element that matches the specified key. | |
unsigned | validateTree () const |
validateTree - A utility method that checks that the balancing and ordering invariants of the tree are satisfied. | |
void | retain () |
void | release () |
void | destroy () |
Friends | |
class | ImutAVLFactory< ImutInfo > |
class | ImutIntervalAVLFactory< ImutInfo > |
class | ImutAVLTreeGenericIterator< ImutInfo > |
Definition at line 44 of file ImmutableSet.h.
using llvm::ImutAVLTree< ImutInfo >::Factory = ImutAVLFactory<ImutInfo> |
Definition at line 49 of file ImmutableSet.h.
using llvm::ImutAVLTree< ImutInfo >::iterator = ImutAVLTreeInOrderIterator<ImutInfo> |
Definition at line 50 of file ImmutableSet.h.
using llvm::ImutAVLTree< ImutInfo >::key_type_ref = typename ImutInfo::key_type_ref |
Definition at line 46 of file ImmutableSet.h.
using llvm::ImutAVLTree< ImutInfo >::value_type = typename ImutInfo::value_type |
Definition at line 47 of file ImmutableSet.h.
using llvm::ImutAVLTree< ImutInfo >::value_type_ref = typename ImutInfo::value_type_ref |
Definition at line 48 of file ImmutableSet.h.
|
inline |
begin - Returns an iterator that iterates over the nodes of the tree in an inorder traversal.
The returned iterator thus refers to the the tree node with the minimum data element.
Definition at line 114 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTree< ValInfo >::isEqual().
|
inline |
contains - Returns true if this tree contains a subtree (node) that has an data element that matches the specified key.
Complexity is logarithmic in the size of the tree.
Definition at line 172 of file ImmutableSet.h.
|
inline |
Definition at line 330 of file ImmutableSet.h.
Referenced by llvm::ImutAVLFactory< ImutInfo >::getCanonicalTree(), and llvm::ImutAVLTree< ValInfo >::release().
|
inline |
end - Returns an iterator for the tree that denotes the end of an inorder traversal.
Definition at line 118 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTree< ValInfo >::isEqual().
|
inline |
find - Finds the subtree associated with the specified key value.
This method returns NULL if no matching subtree is found.
Definition at line 77 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTree< ValInfo >::contains().
|
inline |
getHeight - Returns the height of the tree.
A tree with no subtrees has a height of 1.
Definition at line 70 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTree< ValInfo >::validateTree().
|
inline |
Return a pointer to the left subtree.
This value is NULL if there is no left subtree.
Definition at line 62 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTreeGenericIterator< ImutInfo >::operator++(), llvm::ImutAVLTreeGenericIterator< ImutInfo >::operator--(), llvm::ImutAVLTree< ValInfo >::size(), and llvm::ImutAVLTree< ValInfo >::validateTree().
|
inline |
getMaxElement - Find the subtree associated with the highest ranged key value.
Definition at line 93 of file ImmutableSet.h.
|
inline |
Return a pointer to the right subtree.
This value is NULL if there is no right subtree.
Definition at line 66 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTreeGenericIterator< ImutInfo >::operator++(), llvm::ImutAVLTreeGenericIterator< ImutInfo >::operator--(), llvm::ImutAVLTree< ValInfo >::size(), and llvm::ImutAVLTree< ValInfo >::validateTree().
|
inline |
getValue - Returns the data value associated with the tree node.
Definition at line 73 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTree< ValInfo >::isElementEqual(), and llvm::ImutAVLTree< ValInfo >::validateTree().
|
inline |
Definition at line 134 of file ImmutableSet.h.
|
inline |
Definition at line 120 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTree< ValInfo >::isElementEqual(), and llvm::ImutAVLTree< ValInfo >::isEqual().
|
inline |
isEqual - Compares two trees for structural equality and returns true if they are equal.
This worst case performance of this operation is
Definition at line 141 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTree< ValInfo >::isNotEqual().
|
inline |
isNotEqual - Compares two trees for structural inequality.
Performance is the same is isEqual.
Definition at line 167 of file ImmutableSet.h.
|
inline |
Definition at line 324 of file ImmutableSet.h.
Referenced by llvm::ImutAVLFactory< ImutInfo >::ImutAVLTree< ImutInfo >.
|
inline |
Definition at line 322 of file ImmutableSet.h.
Referenced by llvm::IntrusiveRefCntPtrInfo< ImutAVLTree< ImutInfo > >::retain().
|
inline |
size - Returns the number of nodes in the tree, which includes both leaves and non-leaf nodes.
Definition at line 102 of file ImmutableSet.h.
|
inline |
validateTree - A utility method that checks that the balancing and ordering invariants of the tree are satisfied.
It is a recursive method that returns the height of the tree, which is then consumed by the enclosing validateTree call. External callers should ignore the return value. An invalid tree will cause an assertion to fire in a debug build.
Definition at line 180 of file ImmutableSet.h.
Referenced by llvm::ImutAVLTree< ValInfo >::validateTree().
|
friend |
Definition at line 1 of file ImmutableSet.h.
|
friend |
Definition at line 1 of file ImmutableSet.h.
|
friend |
Definition at line 1 of file ImmutableSet.h.