Implementation of the bubble data structure, a data structure that is highly influenced from the fibonacci heap structure. Bubble uses an array and avl_trees to store elements and fastly retreieve or insert new ones. Insertion/removal time complexity is O(logn + logm) == O(log(n + m)) where n is the size of the initial array(or the input bubble size) and m is the number of nodes at the index that the bubble is going to search.
More...
|
| bubble () noexcept |
| default constructor of bubble
|
|
template<size_t _NEW_SIZE> |
| bubble (const bubble< T, _NEW_SIZE > &t) |
| copy constructor of bubble
|
|
template<size_t _NEW_SIZE> |
const bubble | operator= (bubble< T, _NEW_SIZE > &t) |
| operator = for bubble class
|
|
template<typename... Args> |
void | insert (Args ...keys) |
| insert function for bubble
|
|
template<typename... Args> |
void | remove (Args ...keys) |
| remove function for bubble
|
|
bool | search (const T &key) |
| search function for bubble
|
|
T | get_key (const size_t &index) const |
| get_key function
|
|
avl_tree< T > | get_tree (const size_t &index) const |
| get_tree function
|
|
iterator | begin () noexcept |
| begin iterator
|
|
iterator | end () noexcept |
| end iterator
|
|
size_t | size () const |
| size function for bubble
|
|
size_t | array_size () const |
| array_size function for bubble
|
|
bool | empty () const |
| empty function for bubble
|
|
std::pair< T, std::vector< T > > | operator[] (const size_t &index) const |
| operator [] for bubble
|
|
template<typename T, size_t _SIZE>
class bubble< T, _SIZE >
Implementation of the bubble data structure, a data structure that is highly influenced from the fibonacci heap structure. Bubble uses an array and avl_trees to store elements and fastly retreieve or insert new ones. Insertion/removal time complexity is O(logn + logm) == O(log(n + m)) where n is the size of the initial array(or the input bubble size) and m is the number of nodes at the index that the bubble is going to search.
implementation of bubble<T, SIZE>