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

Method Get

library/cpp/containers/comptrie/make_fast_layout.cpp:158–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 }
157
158 size_t Get(size_t key) {
159 auto pos = Data.find(key);
160 if (pos == Data.end()) {
161 ythrow yexception() << "Bad node walking order: trying to get node offset too early or too many times!";
162 }
163 size_t result = pos->second;
164 if (ParentCounts.Dec(key) == 0) {
165 // We don't need this offset any more.
166 Data.erase(pos);
167 }
168 return result;
169 }
170
171 private:
172 TTrieNodeCounts ParentCounts;

Callers 2

MeasureSubtrieMethod · 0.45
PrepareOffsetMethod · 0.45

Calls 4

findMethod · 0.45
endMethod · 0.45
DecMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected