main D-Tree container of the unique ordered elements (D-Tree is kind of the B-Tree)
More...
|
| DTree (const Comp &comp=Comp(), const KeyOfVal &kofval=KeyOfVal()) |
| default constructor
|
|
template<typename Iter > |
| DTree (Iter first, Iter last, const Comp &comp=Comp(), const KeyOfVal &kofval=KeyOfVal()) |
| constructor with range assignment
|
|
| DTree (std::initializer_list< value_type > init, const Comp &comp=Comp(), const KeyOfVal &kofval=KeyOfVal()) |
| constructor with initializer list
|
|
| DTree (const DTree &dt) |
| copy construcror
|
|
| DTree (DTree &&dt) noexcept |
| move constructor
|
|
| ~DTree () |
| destructor
|
|
DTree & | operator= (const DTree &dt) |
| copy assignment
|
|
DTree & | operator= (DTree &&dt) noexcept |
| move assignment
|
|
DTree & | operator= (std::initializer_list< value_type > init) |
| assignment of initilizer list
|
|
bool | empty () const |
| return true if empty
|
|
size_t | size () const |
| return size
|
|
void | clear () |
| clear (remove all elements)
|
|
iterator | find (const key_type &key) |
| find element or return end iterator
|
|
const_iterator | find (const key_type &key) const |
| find element or return end iterator
|
|
iterator | begin () |
| return iterator to first element
|
|
const_iterator | cbegin () const |
| return iterator to first element
|
|
const_iterator | begin () const |
| return iterator to first element
|
|
iterator | end () |
| return iterator after last element
|
|
const_iterator | end () const |
| return iterator after last element
|
|
const_iterator | cend () const |
| return iterator after last element
|
|
iterator | lower_bound (const key_type &key) |
| first element that not less than key
|
|
const_iterator | lower_bound (const key_type &key) const |
| first element that not less than key
|
|
iterator | upper_bound (const key_type &key) |
| first element that greater than key
|
|
const_iterator | upper_bound (const key_type &key) const |
| first element that greater than key
|
|
std::pair< iterator, bool > | insert (const value_type &value) |
| insert new element
|
|
void | insert (std::initializer_list< value_type > ilist) |
| insert new elements from initializer list
|
|
template<typename Iter > |
void | insert (Iter first, Iter last) |
|
iterator | erase (const_iterator it) |
| remove element in postion pointed by iterator
|
|
size_t | erase (const key_type &key) |
| remove element by key
|
|
void | replace (iterator iter, const value_type &value) |
| replace element with checking range
|
|
bool | operator== (const DTree &dt) const |
| lexicograhical equal to
|
|
bool | operator!= (const DTree &dt) const |
| lexicograhical not equal
|
|
bool | operator< (const DTree &dt) const |
| lexicograhical less
|
|
bool | operator<= (const DTree &dt) const |
| lexicograhical less or equal
|
|
bool | operator> (const DTree &dt) const |
| lexicograhical greater
|
|
bool | operator>= (const DTree &dt) const |
| lexicograhical greater or equal
|
|
template<typename K, typename T = K, typename Comp = std::less<K>, typename KeyOfVal = Identity<K>, typename AT = T>
class CLRX::DTree< K, T, Comp, KeyOfVal, AT >
main D-Tree container of the unique ordered elements (D-Tree is kind of the B-Tree)
The DTree is container very similar to the B+Tree (B-Tree that holds values in leafs). This container holds unique values in sorted order (from smallest to greatest). Arrays of values is held in Node0 nodes which can hold 18-56 elements. Array of values holds empty spaces to improve insertion (shorter moving of the elements). Second type of Node is Node1 that holds Node0's or Node1's. It can hold 2-8 children. DTree have static depth for all leafs (from every leaf is this same step number to root).
About invalidation: every insertion or removal can invalidate pointers, references and iterators to over 200 neighbors of the inserted/removed element. Best way is assumption any insert/erase can invalidate any reference, pointer or iterator.