|
LLVM 23.0.0git
|
Non-owning view of a buffer formatted as a complete binary search tree in Eytzinger (breadth-first) order. More...
#include "llvm/ADT/Eytzinger.h"
Public Member Functions | |
| EytzingerTableSpan ()=default | |
| EytzingerTableSpan (const T *Data, size_t NumEntries) | |
| const T * | data () const |
| bool | empty () const |
| size_t | size () const |
| const T & | operator[] (size_t Idx) const |
| template<typename KeyT = T> | |
| std::optional< size_t > | findIndex (const KeyT &Target) const |
| Search this Eytzinger table for Target. | |
| template<typename KeyT = T> | |
| bool | contains (const KeyT &Target) const |
| Check if this Eytzinger table contains Target. | |
| bool | isSorted () const |
| Verify whether the buffer satisfies strictly ascending binary search tree order in Eytzinger layout. | |
Non-owning view of a buffer formatted as a complete binary search tree in Eytzinger (breadth-first) order.
Definition at line 27 of file Eytzinger.h.
|
default |
|
inline |
Definition at line 30 of file Eytzinger.h.
References T.
|
inlinenodiscard |
Check if this Eytzinger table contains Target.
Definition at line 60 of file Eytzinger.h.
References findIndex().
|
inlinenodiscard |
Definition at line 33 of file Eytzinger.h.
References T.
|
inlinenodiscard |
Definition at line 34 of file Eytzinger.h.
Referenced by isSorted().
|
inlinenodiscard |
Search this Eytzinger table for Target.
Returns the 0-based array index if found.
KeyT enables heterogeneous lookups, allowing callers to search tables of endian-specific wrappers (e.g., support::ulittle64_t) using native integer keys without explicit conversions at the call site.
Definition at line 48 of file Eytzinger.h.
References I.
Referenced by contains().
|
inlinenodiscard |
Verify whether the buffer satisfies strictly ascending binary search tree order in Eytzinger layout.
Runs iteratively in O(N) time and O(1) space.
Definition at line 66 of file Eytzinger.h.
References empty(), I, llvm::Left, llvm::Right, and T.
|
inlinenodiscard |
Definition at line 36 of file Eytzinger.h.
|
inlinenodiscard |
Definition at line 35 of file Eytzinger.h.