| 23 | |
| 24 | template <typename Cmp, typename V> |
| 25 | TVector<TFeaturePosition> GetPositionBy(const TFullModel& model, const TVector<V>& factors) { |
| 26 | TVector<TFeaturePosition> factorIds; |
| 27 | const auto& floatFeatures = model.ModelTrees->GetFloatFeatures(); |
| 28 | for (const auto& factor : factors) { |
| 29 | const auto it = std::find_if( |
| 30 | floatFeatures.begin(), |
| 31 | floatFeatures.end(), |
| 32 | [&factor](const auto& node) { return Cmp()(node, factor); }); |
| 33 | |
| 34 | CB_ENSURE(it != floatFeatures.end(), "feature not found"); |
| 35 | factorIds.emplace_back(it->Position); |
| 36 | } |
| 37 | return factorIds; |
| 38 | } |
| 39 | |
| 40 | ui64 RemoveMask(ui64 path, ui64 mask) { |
| 41 | // reduce path in oblivious tree by mask |
nothing calls this directly
no test coverage detected