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

Method FindByItem

library/cpp/cache/cache.h:687–695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

685 bool MultiValue;
686
687 TIterator FindByItem(TItem* item) {
688 std::pair<TIndexIterator, TIndexIterator> p = Index.equal_range(*item);
689 // we have to delete the exact unlinked item (there may be multiple items for one key)
690 TIndexIterator it;
691 for (it = p.first; it != p.second; ++it)
692 if (&*it == item)
693 break;
694 return (it == p.second ? End() : TIterator(it));
695 }
696
697 void EraseFromIndex(TItem* item) {
698 TDeleter::Destroy(item->Value);

Callers 3

FindOldestMethod · 0.80
FindLightestMethod · 0.80

Calls 2

TIteratorClass · 0.70
equal_rangeMethod · 0.45

Tested by

no test coverage detected