|
Advanced Chunk Processing Library 0.2.0
A comprehensive C++ library for advanced data chunking strategies and processing operations
|
A skip list implementation for efficient chunk searching. More...
#include <advanced_structures.hpp>
Collaboration diagram for advanced_structures::ChunkSkipList< T >:Classes | |
| struct | Node |
Public Member Functions | |
| ChunkSkipList (int max_lvl=16, float prob=0.5) | |
| Constructs a new ChunkSkipList object. | |
| void | insert (const T &value) |
| Inserts a value into the skip list. | |
| bool | search (const T &value) const |
| Searches for a value in the skip list. | |
Private Member Functions | |
| int | random_level () |
| Generates a random level for node insertion. | |
Private Attributes | |
| int | current_level |
| std::shared_ptr< Node > | head |
| int | max_level |
| float | p |
A skip list implementation for efficient chunk searching.
| T | The type of elements stored in the skip list |
Definition at line 151 of file advanced_structures.hpp.
|
inline |
Constructs a new ChunkSkipList object.
| max_lvl | Maximum level of the skip list |
| prob | Probability factor for level generation |
Definition at line 182 of file advanced_structures.hpp.
References advanced_structures::ChunkSkipList< T >::head, and advanced_structures::ChunkSkipList< T >::max_level.
|
inline |
Inserts a value into the skip list.
| value | The value to insert |
Definition at line 191 of file advanced_structures.hpp.
References advanced_structures::ChunkSkipList< T >::current_level, advanced_structures::ChunkSkipList< T >::head, advanced_structures::ChunkSkipList< T >::max_level, and advanced_structures::ChunkSkipList< T >::random_level().
|
inlineprivate |
Generates a random level for node insertion.
Definition at line 168 of file advanced_structures.hpp.
References advanced_structures::ChunkSkipList< T >::max_level, and advanced_structures::ChunkSkipList< T >::p.
Referenced by advanced_structures::ChunkSkipList< T >::insert().
|
inline |
Searches for a value in the skip list.
| value | The value to search for |
Definition at line 222 of file advanced_structures.hpp.
References advanced_structures::ChunkSkipList< T >::current_level, and advanced_structures::ChunkSkipList< T >::head.
|
private |
Definition at line 162 of file advanced_structures.hpp.
Referenced by advanced_structures::ChunkSkipList< T >::insert(), and advanced_structures::ChunkSkipList< T >::search().
|
private |
Definition at line 159 of file advanced_structures.hpp.
Referenced by advanced_structures::ChunkSkipList< T >::ChunkSkipList(), advanced_structures::ChunkSkipList< T >::insert(), and advanced_structures::ChunkSkipList< T >::search().
|
private |
Definition at line 160 of file advanced_structures.hpp.
Referenced by advanced_structures::ChunkSkipList< T >::ChunkSkipList(), advanced_structures::ChunkSkipList< T >::insert(), and advanced_structures::ChunkSkipList< T >::random_level().
|
private |
Definition at line 161 of file advanced_structures.hpp.
Referenced by advanced_structures::ChunkSkipList< T >::random_level().