7#include "../bp_tree/bp_tree.hpp"
8#include "./bit_container.hpp"
10#include "./bit_forward_iterator.hpp"
11#include "./bit_deque_container.hpp"
12#include "stool/include/light_stool.hpp"
22 template <
typename CONTAINER,
typename CONTAINER_ITERATOR, u
int64_t MAX_TREE_DEGREE, u
int64_t MAX_BIT_CONTAINER_SIZE>
30 static inline constexpr int DEFAULT_CONTAINER_DEGREE = 62;
75 return this->tree.
size();
100 return this->tree.
empty();
110 return this->tree.
at(
pos) & 1;
126 return this->tree.
psum(i - 1);
131 throw std::range_error(
"Error: DynamicBitSequence::rank1()");
142 return i - this->
rank1(i);
227 return this->
rank(_size,
c);
252 return this->tree.
psum(
x);
261 return this->tree.
psum();
287 this->tree.
initialize(
degree, DynamicBitSequence::DEFAULT_CONTAINER_DEGREE);
358 bool b1 = this->
at(i);
380 std::cout <<
"unsorted" << std::endl;
394 void print_debug_info()
const{
395 std::cout <<
"DynamicBitSequence::print_debug_info()" << std::endl;
396 this->tree.print_debug_info();
415 std::vector<std::string>
r;
421 +
" bytes, " + std::to_string(
size) +
" elements, " + std::to_string(
bits_per_element) +
" bytes per element =");
422 for (std::string &
s :
log1)
437 for (std::string &
s :
log)
439 std::cout <<
s << std::endl;
449 std::cout << stool::Message::get_paragraph_string(
message_paragraph) <<
"Statistics(DynamicBitSequence):" << std::endl;
451 std::cout << stool::Message::get_paragraph_string(
message_paragraph) <<
"[END]" << std::endl;
460 std::cout << stool::Message::get_paragraph_string(
message_paragraph) <<
"Content(DynamicBitSequence):" << std::endl;
462 std::cout << stool::Message::get_paragraph_string(
message_paragraph) <<
"[END]" << std::endl;
488 std::vector<uint64_t>
r;
538 bool b = stool::MSBByte::get_bit(bits, i);
677 s +=
"DynamicSequence(";
678 s += CONTAINER::name();
683 void print_information_about_performance(
int message_paragraph = stool::Message::SHOW_MESSAGE)
const{
684 std::cout << stool::Message::get_paragraph_string(
message_paragraph) <<
"Performance Information (DynamicSequence)[" << std::endl;
686 std::cout << stool::Message::get_paragraph_string(
message_paragraph) <<
"]" << std::endl;
689 double density()
const{
690 return this->tree.get_value_density();
707 using DynamicBitDequeSequence = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, bptree::DEFAULT_MAX_DEGREE_OF_INTERNAL_NODE, 1024>;
708 using DynamicBitDequeSequenceA = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 62, 512>;
709 using DynamicBitDequeSequenceB = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 62, 1024>;
710 using DynamicBitDequeSequenceC = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 62, 2048>;
711 using DynamicBitDequeSequenceD = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 62, 4096>;
713 using DynamicBitDequeSequence1 = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 14, 8192>;
714 using DynamicBitDequeSequence2 = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 30, 8192>;
715 using DynamicBitDequeSequence3 = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 62, 8192>;
716 using DynamicBitDequeSequence4 = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 126, 8192>;
718 using SimpleDynamicBitSequence = DynamicBitSequence<BDC, BDC::BitDequeContainerIterator, 62, 8192>;