MCPcopy Create free account
hub / github.com/catboost/catboost / FixHeap

Method FixHeap

library/cpp/cache/cache.h:446–458  ·  view source on GitHub ↗

Physically remove erased elements from the heap

Source from the content-addressed store, hash-verified

444private:
445 // Physically remove erased elements from the heap
446 void FixHeap() {
447 if (Removed.empty()) {
448 return;
449 }
450
451 Heap.erase(std::remove_if(Heap.begin(), Heap.end(), [this](TItem* item) {
452 return this->Removed.contains(item);
453 }),
454 Heap.end());
455 MakeHeap(Heap.begin(), Heap.end(), THeapComparator());
456 Removed.clear();
457 Size = Heap.size();
458 }
459
460private:
461 TVector<TItem*> Heap;

Callers

nothing calls this directly

Calls 9

MakeHeapFunction · 0.85
THeapComparatorClass · 0.85
emptyMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
containsMethod · 0.45
clearMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected