| 7 | |
| 8 | namespace NCB { |
| 9 | void ParseBordersFileLine( |
| 10 | const TString& line, |
| 11 | ui32* flatFeatureIdx, |
| 12 | float* border, |
| 13 | TMaybe<ENanMode>* nanMode |
| 14 | ) { |
| 15 | TVector<TString> tokens; |
| 16 | StringSplitter(line).Split('\t').SkipEmpty().Collect(&tokens); |
| 17 | CB_ENSURE( |
| 18 | tokens.ysize() == 2 || tokens.ysize() == 3, |
| 19 | "Each line should have two or three columns"); |
| 20 | *flatFeatureIdx = FromString<ui32>(tokens[0]); |
| 21 | |
| 22 | *border = FromString<float>(tokens[1]); |
| 23 | |
| 24 | *nanMode = Nothing(); |
| 25 | if (tokens.ysize() == 3) { |
| 26 | *nanMode = FromString<ENanMode>(tokens[2]); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | void OutputFeatureBorders( |
| 31 | ui32 flatFeatureIdx, |
no test coverage detected