MCPcopy Create free account
hub / github.com/KaHIP/KaHIP / decreaseKey

Method decreaseKey

lib/node_ordering/reductions.cpp:163–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers 1

forall_out_edgesFunction · 0.45

Calls 2

sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected