- Timestamp:
- 09/24/12 09:44:08 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/CSV/ClassifiactionCSVInstanceProvider.cs
r8601 r8685 131 131 public override void ExportData(IClassificationProblemData instance, string path) { 132 132 var strBuilder = new StringBuilder(); 133 134 foreach (var variable in instance. InputVariables) {135 strBuilder.Append(variable + CultureInfo.CurrentCulture.TextInfo.ListSeparator);133 var colSep = CultureInfo.CurrentCulture.TextInfo.ListSeparator; 134 foreach (var variable in instance.Dataset.VariableNames) { 135 strBuilder.Append(variable.Replace(colSep, String.Empty) + colSep); 136 136 } 137 strBuilder.Remove(strBuilder.Length - CultureInfo.CurrentCulture.TextInfo.ListSeparator.Length, CultureInfo.CurrentCulture.TextInfo.ListSeparator.Length);137 strBuilder.Remove(strBuilder.Length - colSep.Length, colSep.Length); 138 138 strBuilder.AppendLine(); 139 139 … … 142 142 for (int i = 0; i < dataset.Rows; i++) { 143 143 for (int j = 0; j < dataset.Columns; j++) { 144 if (j > 0) strBuilder.Append( CultureInfo.CurrentCulture.TextInfo.ListSeparator);144 if (j > 0) strBuilder.Append(colSep); 145 145 strBuilder.Append(dataset.GetValue(i, j)); 146 146 }
Note: See TracChangeset
for help on using the changeset viewer.