|
LLVM 24.0.0git
|
Owning container that stores elements in a complete binary search tree formatted in Eytzinger (breadth-first) order. More...
#include "llvm/ADT/Eytzinger.h"
Public Member Functions | |
| EytzingerTable ()=default | |
| EytzingerTableSpan< T > | asSpan () const |
| template<typename KeyT = T> | |
| std::optional< size_t > | findIndex (const KeyT &Target) const |
| template<typename KeyT = T> | |
| bool | contains (const KeyT &Target) const |
| bool | isSorted () const |
| const T * | data () const |
| size_t | size () const |
| bool | empty () const |
| const T & | operator[] (size_t Idx) const |
Static Public Member Functions | |
| template<typename KeyT = T> | |
| static EytzingerTable< T > | create (std::vector< KeyT > Keys) |
| Construct an Eytzinger search tree from a vector of keys by sorting, deduplicating, and reordering elements into breadth-first layout. | |
Owning container that stores elements in a complete binary search tree formatted in Eytzinger (breadth-first) order.
Definition at line 118 of file Eytzinger.h.
|
default |
Referenced by create().
|
inlinenodiscard |
Definition at line 148 of file Eytzinger.h.
Referenced by contains(), findIndex(), and isSorted().
|
inlinenodiscard |
Definition at line 158 of file Eytzinger.h.
References asSpan().
|
inlinestatic |
Construct an Eytzinger search tree from a vector of keys by sorting, deduplicating, and reordering elements into breadth-first layout.
KeyT may differ from T (e.g., creating EytzingerTable<ulittle64_t> from a vector of uint64_t).
Definition at line 131 of file Eytzinger.h.
References EytzingerTable(), llvm::sort(), T, and llvm::unique().
|
inlinenodiscard |
Definition at line 164 of file Eytzinger.h.
References T.
|
inlinenodiscard |
Definition at line 166 of file Eytzinger.h.
|
inlinenodiscard |
Definition at line 153 of file Eytzinger.h.
References asSpan().
|
inlinenodiscard |
Definition at line 162 of file Eytzinger.h.
References asSpan().
|
inlinenodiscard |
Definition at line 167 of file Eytzinger.h.
|
inlinenodiscard |
Definition at line 165 of file Eytzinger.h.