Changeset 6963 for trunk/sources/HeuristicLab.Problems.DataAnalysis
- Timestamp:
- 11/08/11 11:01:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/TableFileParser.cs
r6776 r6963 156 156 } else if (OccurrencesOf(charCounts, ',') > 10) { 157 157 // no points and many commas 158 int countCommaNonDigitPairs = 0; 159 for (int i = 0; i < charsRead - 1; i++) { 160 if (buffer[i] == ',' && !Char.IsDigit(buffer[i + 1])) { 161 countCommaNonDigitPairs++; 158 // count the number of tokens (chains of only digits and commas) that contain multiple comma characters 159 int tokensWithMultipleCommas = 0; 160 for (int i = 0; i < charsRead; i++) { 161 int nCommas = 0; 162 while (i < charsRead && (buffer[i] == ',' || Char.IsDigit(buffer[i]))) { 163 if (buffer[i] == ',') nCommas++; 164 i++; 162 165 } 163 } 164 if (countCommaNonDigitPairs > 10) { 166 if (nCommas > 2) tokensWithMultipleCommas++; 167 } 168 if (tokensWithMultipleCommas > 1) { 165 169 // English format (only integer values) with ',' as separator 166 170 numberFormat = NumberFormatInfo.InvariantInfo;
Note: See TracChangeset
for help on using the changeset viewer.