| 161 | } |
| 162 | |
| 163 | void decreaseKey(NodeID node, Count decrease) { |
| 164 | remove_from_bucket(locations[node].first, locations[node].second); |
| 165 | locations[node].first -= decrease; |
| 166 | locations[node].second = buckets[locations[node].first].size(); |
| 167 | buckets[locations[node].first].push_back(node); |
| 168 | if (locations[node].first < (int)min_ptr) { |
| 169 | min_ptr = locations[node].first; |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | NodeID deleteMin() { |
| 174 | auto min_node = buckets[min_ptr].back(); |
no test coverage detected