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

Function RandStr

library/cpp/containers/comptrie/comptrie_ut.cpp:653–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

651}
652
653static TString RandStr(const size_t max) {
654 size_t len = RandomNumber<size_t>() % max;
655 TString key;
656 for (size_t j = 0; j < len; ++j)
657 key += RandChar();
658 return key;
659}
660
661template <class T, bool minimize>
662void TCompactTrieTest::TestRandom(const size_t n, const size_t maxKeySize) {

Callers 2

TestRandomMethod · 0.85

Calls 3

RandCharFunction · 0.85
GenRandMethod · 0.45
sizeMethod · 0.45

Tested by 2

TestRandomMethod · 0.68