| 81 | } |
| 82 | |
| 83 | void ClearFloatFeatures( |
| 84 | TVector<TFloatFeature>& floatFeatures, |
| 85 | const TVector<TFeaturePosition>& factorToRemove |
| 86 | ) { |
| 87 | EraseIf(floatFeatures, [&factorToRemove](const auto& factor) { |
| 88 | return FindIf(factorToRemove, [&factor](const auto& toRemove) { |
| 89 | return factor.Position.Index == toRemove.Index; |
| 90 | }) != factorToRemove.end(); |
| 91 | }); |
| 92 | |
| 93 | for (auto& feature : floatFeatures) { |
| 94 | const auto shift = CountIf(factorToRemove, [&feature](const auto& toRemove) { |
| 95 | return feature.Position.FlatIndex > toRemove.FlatIndex; |
| 96 | }); |
| 97 | feature.Position.Index -= shift; |
| 98 | feature.Position.FlatIndex -= shift; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | void ClearCatFeatures( |
| 103 | TVector<TCatFeature>& catFeatures, |
no test coverage detected