auto [liter, riter] = donor_is_left ?
std::make_pair(donor_iter, iter) : std::make_pair(iter, donor_iter);
- if (donor->below_min_capacity()) {
+ if (donor->at_min_capacity()) {
auto replacement = l->make_full_merge(c, r);
parent_pos.node->update(
return get_size() == get_capacity();
}
+ bool at_min_capacity() const {
+ assert(get_size() >= (get_min_capacity() - 1));
+ return get_size() <= get_min_capacity();
+ }
+
bool below_min_capacity() const {
assert(get_size() >= (get_min_capacity() - 1));
return get_size() < get_min_capacity();
return get_size() == get_capacity();
}
+ bool at_min_capacity() const {
+ assert(get_size() >= (get_min_capacity() - 1));
+ return get_size() <= get_min_capacity();
+ }
+
bool below_min_capacity() const {
assert(get_size() >= (get_min_capacity() - 1));
return get_size() < get_min_capacity();