15 std::vector<uint64_t> items;
24 this->items.push_back(
x);
31 return this->items.
size();
35 return sizeof(std::vector<uint64_t>) + (this->items.capacity() *
sizeof(
uint64_t));
40 return this->items[
pos];
49 this->items.shrink_to_fit();
55 static std::string name()
57 return "plain integers";
66 _sum += this->items[j];
78 if (this->items.size() == 0)
84 return this->psum(this->items.size() - 1);
92 _sum += this->items[i];
104 std::string to_string()
const
110 s += std::to_string(this->items[i]);
111 if (i + 1 < this->items.size())
119 std::vector<uint64_t> to_value_vector()
const
121 std::vector<uint64_t>
r;
128 template<
typename VEC>
132 for (
uint64_t i = 0; i < this->size(); i++)
142 this->items.insert(this->items.begin() +
pos,
value);
148 this->items.erase(this->items.begin() +
pos);
150 void push_front(std::vector<uint64_t> &
new_items)
152 std::vector<uint64_t>
tmp;
166 std::vector<uint64_t>
tmp;
175 void push_back(std::vector<uint64_t> &
new_items)
204 std::vector<uint64_t>
tmp1;
209 assert(this->items.size() > 0);
210 tmp1[
k--] = this->items[this->items.size() - 1];
211 this->items.pop_back();
220 size_t size = this->items.
size();
221 for (
size_t x = 0;
x <
len;
x++)
223 sum += this->items[size - 1 -
x];
236 throw std::runtime_error(
"No implementation");
242 this->items[i] +=
delta;
245 std::vector<uint64_t>::const_iterator begin()
const {
246 return this->items.begin();
249 std::vector<uint64_t>::const_iterator end()
const {
250 return this->items.end();
254 return stool::StringFunctions::rank_query(this->items, i,
c);
257 return this->rank(0, i);
260 return this->rank(1, i);
264 return stool::StringFunctions::select_query(this->items, i,
c);
267 return this->select(0, i);
270 return this->select(1, i);
272 void sort_leaf_containers()