A dynamic data structure that maintains a sequence of 64-bit non-negative integers S[0..n-1].
More...
|
|
|
| DynamicSequence64 () |
| | Default constructor with |S| = 0.
|
| |
|
| DynamicSequence64 (DynamicSequence64 &&) noexcept=default |
| | Default move constructor.
|
| |
|
|
Tree::ValueForwardIterator | begin () const |
| | Returns an iterator to the beginning of the sequence S.
|
| |
|
Tree::ValueForwardIterator | end () const |
| | Returns an iterator to the end of the sequence S.
|
| |
|
|
DynamicSequence64 & | operator= (const DynamicSequence64 &)=delete |
| | Deleted copy assignment operator.
|
| |
|
DynamicSequence64 & | operator= (DynamicSequence64 &&) noexcept=default |
| | Default move assignment operator.
|
| |
|
uint64_t | operator[] (uint64_t n) const |
| | The alias for at query.
|
| |
|
|
Tree & | __get_tree () |
| | Get the internal tree storing the sequence S.
|
| |
|
uint64_t | get_degree () const |
| | Return the maximum degree of internal nodes of the internal tree storing the sequence S.
|
| |
|
uint64_t | size () const |
| | Return |S|.
|
| |
| uint64_t | size_in_bytes (bool only_dynamic_memory=false) const |
| | Returns the total memory usage in bytes.
|
| |
|
|
std::vector< uint64_t > | to_vector () const |
| | Return S as a vector.
|
| |
|
std::string | to_string () const |
| | Return S as a string.
|
| |
|
| uint64_t | at (uint64_t pos) const |
| | Return the (i+1)-th element of S[i].
|
| |
|
| void | set_value (uint64_t i, uint64_t v) |
| | Set a given value v at a given position i in S.
|
| |
| void | increment (uint64_t i, int64_t delta) |
| | Set the value S[i+delta] at a given position i in S.
|
| |
| void | decrement (uint64_t i, int64_t delta) |
| | Set the value S[i-delta] at a given position i in S.
|
| |
|
void | swap (DynamicSequence64 &item) |
| | Swap operation.
|
| |
|
void | clear () |
| | Clear the elements in S.
|
| |
| void | push_back (uint64_t value) |
| | Add a given integer to the end of S.
|
| |
| void | push_many (const std::vector< uint64_t > &items) |
| | Add a given sequence Q[0..k-1] to the end of S[0..n-1] (i.e., S = S[0..n-1]Q[0..k-1])
|
| |
| void | push_front (uint64_t value) |
| | Add a given value to the beginning of S.
|
| |
| void | pop_back () |
| | Remove the last element from S.
|
| |
| void | pop_front () |
| | Remove the first element from S.
|
| |
| void | insert (uint64_t pos, uint64_t value) |
| | Insert a given integer value into S as the (pos+1)-th element.
|
| |
| void | remove (uint64_t pos) |
| | Remove the element at the position pos from S and return it.
|
| |
|
| std::vector< std::string > | get_memory_usage_info (int message_paragraph=stool::Message::SHOW_MESSAGE) const |
| | Return the memory usage information of this data structure as a vector of strings.
|
| |
|
void | print_info () const |
| | Print the statistics of this data structure.
|
| |
| void | print_memory_usage (int message_paragraph=stool::Message::SHOW_MESSAGE) const |
| | Print the memory usage information of this data structure.
|
| |
| void | print_statistics (int message_paragraph=stool::Message::SHOW_MESSAGE) const |
| | Print the statistics of this data structure.
|
| |
|
void | verify () const |
| | Verify the internal consistency of this data structure.
|
| |
|
|
|
static DynamicSequence64 | build (const std::vector< uint64_t > &items) |
| | Build a new DynamicSequence64 from a given sequence items.
|
| |
|
static DynamicSequence64 | load_from_bytes (const std::vector< uint8_t > &data, uint64_t &pos) |
| | Returns the DynamicSequence64 instance loaded from a byte vector data at the position pos.
|
| |
|
static DynamicSequence64 | load_from_file (std::ifstream &ifs) |
| | Returns the DynamicPrefixSum instance loaded from a file stream ifs.
|
| |
|
static void | store_to_bytes (DynamicSequence64 &item, std::vector< uint8_t > &output, uint64_t &pos) |
| | Save the given instance item to a byte vector output at the position pos.
|
| |
|
static void | store_to_file (DynamicSequence64 &item, std::ofstream &os) |
| | Save the given instance item to a file stream os.
|
| |
|
|
static std::string | name () |
| | Return the name of the DynamicPrefixSum for debugging.
|
| |
template<typename LEAF_CONTAINER = stool::NaiveFLCVector<>, uint64_t TREE_DEGREE = 62, uint64_t LEAF_CONTAINER_MAX_SIZE = 256>
class stool::bptree::DynamicSequence64< LEAF_CONTAINER, TREE_DEGREE, LEAF_CONTAINER_MAX_SIZE >
A dynamic data structure that maintains a sequence of 64-bit non-negative integers S[0..n-1].