Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12199


Ignore:
Timestamp:
03/13/15 19:51:32 (9 years ago)
Author:
gkronber
Message:

#2352: merged r12137, r12151:12152 from trunk to stable

Location:
stable
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Analysis.Statistics.Views/3.3/CorrelationView.cs

    r12009 r12199  
    5656      stringConvertibleMatrixView.Minimum = -1.0;
    5757      stringConvertibleMatrixView.Maximum = 1.0;
     58      stringConvertibleMatrixView.FormatPattern = "0.000";
    5859
    5960      methodComboBox.Items.Add(PearsonName);
     
    212213                .Where(x => !double.IsNaN(x) && !double.IsNegativeInfinity(x) && !double.IsPositiveInfinity(x));
    213214
    214           if (!rowValues.Any() || !columnValues.Any() || i == j || rowValues.Count() != columnValues.Count()) {
     215          if (!rowValues.Any() || !columnValues.Any() || rowValues.Count() != columnValues.Count()) {
    215216            dt[i, j] = double.NaN;
     217          } else if (i == j) {
     218            dt[i, j] = 1.0;
    216219          } else {
    217220            if (methodName == PearsonName) {
  • stable/HeuristicLab.Data.Views/3.3

  • stable/HeuristicLab.Data.Views/3.3/EnhancedStringConvertibleMatrixView.cs

    r12009 r12199  
    4545    public double Minimum { get; set; }
    4646
     47    public string FormatPattern { get; set; }
     48
    4749    public new DoubleMatrix Content {
    4850      get { return (DoubleMatrix)base.Content; }
     
    5254    public EnhancedStringConvertibleMatrixView() {
    5355      InitializeComponent();
     56      FormatPattern = string.Empty;
    5457    }
    5558
     
    5760      columnVisibility = null;
    5861      rowVisibility = null;
     62    }
     63
     64    protected override void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
     65      if (Content != null && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) {
     66        int rowIndex = virtualRowIndices[e.RowIndex];
     67        e.Value = Content[rowIndex, e.ColumnIndex].ToString(FormatPattern);
     68      }
    5969    }
    6070
  • stable/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r12009 r12199  
    281281      dataGridView.Rows[e.RowIndex].ErrorText = string.Empty;
    282282    }
    283     private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
     283    protected virtual void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) {
    284284      if (Content != null && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) {
    285285        int rowIndex = virtualRowIndices[e.RowIndex];
  • stable/HeuristicLab.Problems.DataAnalysis.Views

  • stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs

    r12009 r12199  
    4848    protected AbstractFeatureCorrelationView() {
    4949      InitializeComponent();
     50      dataView.FormatPattern = "0.000";
    5051      fcc = new FeatureCorrelationCalculator();
    5152      var calculators = ApplicationManager.Manager.GetInstances<IDependencyCalculator>();
     
    115116      dataView.Maximum = calc.Maximum;
    116117      dataView.Minimum = calc.Minimum;
     118
    117119      dataView.Content = correlation;
    118120      dataView.Enabled = true;
Note: See TracChangeset for help on using the changeset viewer.