MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / maxHeapsort

Function maxHeapsort

highs/util/HighsSort.cpp:162–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void maxHeapsort(HighsInt* heap_v, HighsInt n) {
163 HighsInt temp_v;
164 HighsInt i;
165 for (i = n; i >= 2; i--) {
166 temp_v = heap_v[i];
167 heap_v[i] = heap_v[1];
168 heap_v[1] = temp_v;
169 maxHeapify(heap_v, 1, i - 1);
170 }
171}
172
173void maxHeapsort(HighsInt* heap_v, HighsInt* heap_i, HighsInt n) {
174 HighsInt temp_v;

Callers 1

maxheapsortFunction · 0.85

Calls 1

maxHeapifyFunction · 0.85

Tested by

no test coverage detected