| 161 | void heapify(size_type i) { heapify(i, m_container.size()); } |
| 162 | |
| 163 | void reverse_heapify(size_type i) { |
| 164 | assert(i < size()); |
| 165 | while (i > 0 && !Base::operator()(m_container[i], m_container[parent(i)])) { |
| 166 | size_t parent_idx = parent(i); |
| 167 | std::swap(m_container[parent_idx], m_container[i]); |
| 168 | m_marker(parent_idx, &m_container[parent_idx]); |
| 169 | m_marker(i, &m_container[i]); |
| 170 | i = parent(i); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | // Sets the value of element i, and rebuilds the priority queue. |
| 175 | void decrease_key(size_type i, value_type const &x) { |
nothing calls this directly
no test coverage detected