MCPcopy Create free account
hub / github.com/KratosMultiphysics/Kratos / find

Method find

kratos/containers/pointer_vector_map.h:386–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384 }
385
386 iterator find(const key_type& Key)
387 {
388 pair_iterator sorted_part_end;
389
390 if(mData.size() - mSortedPartSize >= mMaxBufferSize)
391 {
392 Sort();
393 sorted_part_end = mData.end();
394 }
395 else
396 sorted_part_end = mData.begin() + mSortedPartSize;
397
398 pair_iterator i(std::lower_bound(mData.begin(), sorted_part_end, Key, CompareKey()));
399 if (i == sorted_part_end || (Key != i->first))
400 if((i = std::find_if(sorted_part_end, mData.end(), EqualKeyTo(Key))) == mData.end())
401 return mData.end();
402
403 return i;
404 }
405
406 const_iterator find(const key_type& Key) const
407 {

Callers

nothing calls this directly

Calls 6

const_iteratorClass · 0.85
CompareKeyClass · 0.70
EqualKeyToClass · 0.70
sizeMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected