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

Function SelectValues

tools/enum_parser/parse_enum/benchmark/main.cpp:12–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11 template <class TEnum>
12 TVector<TEnum> SelectValues(size_t count) {
13 auto values = GetEnumAllValues<TEnum>().Materialize();
14 SortBy(values, [](const TEnum& v) { return IntHash(static_cast<ui64>(v)); });
15 values.crop(count);
16 return values;
17 }
18
19 template <class TEnum>
20 TVector<TStringBuf> SelectStrings(size_t count) {

Callers

nothing calls this directly

Calls 4

SortByFunction · 0.85
IntHashFunction · 0.85
cropMethod · 0.80
MaterializeMethod · 0.45

Tested by

no test coverage detected