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

Method GetBlockIdByOffset

library/cpp/netliba/v6/block_chain.h:57–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 return Blocks.ysize();
56 }
57 int GetBlockIdByOffset(int offset) const {
58 TBlockVector::const_iterator i = LowerBound(Blocks.begin(), Blocks.end(), offset, TBlockLess());
59 if (i == Blocks.end())
60 return Blocks.ysize() - 1;
61 if (i->Offset == offset)
62 return (int)(i - Blocks.begin());
63 return (int)(i - Blocks.begin() - 1);
64 }
65 };
66
67 //////////////////////////////////////////////////////////////////////////

Callers 1

SeekMethod · 0.45

Calls 5

LowerBoundFunction · 0.85
TBlockLessClass · 0.70
beginMethod · 0.45
endMethod · 0.45
ysizeMethod · 0.45

Tested by

no test coverage detected