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

Method Insert

library/cpp/threading/skip_list/skiplist.h:184–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182 }
183
184 bool Insert(T value) {
185 TNode* node = PrepareInsert(value);
186 if (Y_UNLIKELY(node && Compare(node, value) == 0)) {
187 // we do not allow duplicates
188 return false;
189 }
190 node = DoInsert(std::move(value));
191 TCounter::OnInsert(node->GetValue());
192 return true;
193 }
194
195 template <typename TInsertAction, typename TUpdateAction>
196 bool Insert(const T& value, TInsertAction insert, TUpdateAction update) {

Callers 7

with_lockMethod · 0.45
with_lockMethod · 0.45
Y_UNIT_TESTFunction · 0.45
TEST_InsertRandomMethod · 0.45
TEST_InsertSequentialMethod · 0.45
TEST_ConcurrentMethod · 0.45

Calls 4

CompareFunction · 0.70
moveFunction · 0.50
insertFunction · 0.50
GetValueMethod · 0.45

Tested by

no test coverage detected