Free cookie consent management tool by TermsFeed Policy Generator

Changeset 340


Ignore:
Timestamp:
06/26/08 11:59:46 (16 years ago)
Author:
gkronber
Message:

fixed serialization in plugin HeuristicLab.DataAnalysis (ticket #175)

Location:
branches/Ticket175Branch/HeuristicLab.DataAnalysis
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/Ticket175Branch/HeuristicLab.DataAnalysis/Dataset.cs

    r333 r340  
    201201        for(int column = 0; column < columns; column++) {
    202202          builder.Append(";");
    203           builder.Append(samples[row * columns + column].ToString(format));
     203          builder.Append(samples[row * columns + column].ToString("r", format));
    204204        }
    205205      }
     
    222222      string s = "";
    223223      for(int i = 0; i < xs.Length; i++) {
    224         s += xs[i].ToString(CultureInfo.InvariantCulture) + "; ";
     224        s += xs[i].ToString("r", CultureInfo.InvariantCulture) + "; ";
    225225      }
    226226
  • branches/Ticket175Branch/HeuristicLab.DataAnalysis/DatasetView.cs

    r312 r340  
    4444          { manipulator.Execute(Dataset); }));
    4545      }
     46
     47      dataGridView.DefaultCellStyle.Format = "r";
    4648    }
    4749
  • branches/Ticket175Branch/HeuristicLab.DataAnalysis/ManualScalingControl.cs

    r312 r340  
    1818      cancelButton.Visible = editingAllowed;
    1919      cancelButton.Text = "Cancel";
     20      dataGridView.DefaultCellStyle.Format = "r";
    2021    }
    2122
  • branches/Ticket175Branch/HeuristicLab.DataAnalysis/SvmExporter.cs

    r234 r340  
    109109        StreamWriter writer = new StreamWriter(filename);
    110110        for(int i = 0; i < dataset.Rows; i++) {
    111           writer.Write(dataset.GetValue(i, targetColumn).ToString(CultureInfo.InvariantCulture) + "\t");
     111          writer.Write(dataset.GetValue(i, targetColumn).ToString("r", CultureInfo.InvariantCulture) + "\t");
    112112          for(int j = 0; j < dataset.Columns; j++) {
    113113            if(j != targetColumn) {
    114114              double val = dataset.GetValue(i, j);
    115115              if(!double.IsInfinity(val) && !double.IsNaN(val))
    116                 writer.Write((j + 1) + ":" + val.ToString(CultureInfo.InvariantCulture) + "\t");
     116                writer.Write((j + 1) + ":" + val.ToString("r", CultureInfo.InvariantCulture) + "\t");
    117117            }
    118118          }
Note: See TracChangeset for help on using the changeset viewer.