Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/04/12 13:10:20 (12 years ago)
Author:
ascheibe
Message:

#1886 added functionality so that calculated values can be stored in the results of the runs

Location:
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj

    r8521 r8569  
    138138    <None Include="Properties\AssemblyInfo.cs.frame" />
    139139  </ItemGroup>
     140  <ItemGroup>
     141    <EmbeddedResource Include="RunCollectionStatisticalTabularView.resx">
     142      <DependentUpon>RunCollectionStatisticalTabularView.cs</DependentUpon>
     143    </EmbeddedResource>
     144  </ItemGroup>
    140145  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    141146  <PropertyGroup>
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionStatisticalTabularView.cs

    r8558 r8569  
    234234      }
    235235    }
     236
     237    private void addValuesButton_Click(object sender, EventArgs e) {
     238      string resultName = (string)dataTableComboBox.SelectedItem;
     239      string rowName = (string)dataRowComboBox.SelectedItem;
     240      var runs = Content.Where(x => x.Results.ContainsKey(resultName));
     241      StringMatrix sm = (StringMatrix)stringConvertibleMatrixView.Content;
     242
     243      for (int i = 0; i < runs.Count(); i++) {
     244        IRun run = runs.ElementAt(i);
     245
     246        for (int j = 0; j < sm.ColumnNames.Count(); j++) {
     247          string newResultName = resultName + " " + rowName + " " + sm.ColumnNames.ElementAt(j);
     248          run.Results.Add(new KeyValuePair<string, Core.IItem>(newResultName, new DoubleValue(double.Parse(sm[i, j]))));
     249        }
     250      }
     251      //update column names of run collection
     252      Content.Modify();
     253    }
    236254  }
    237255}
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/RunCollectionStatisticalTabularView.designer.cs

    r8522 r8569  
    5151      this.dataTableComboBox = new System.Windows.Forms.ComboBox();
    5252      this.addLineToChart = new System.Windows.Forms.Button();
     53      this.addValuesButton = new System.Windows.Forms.Button();
    5354      this.SuspendLayout();
    5455      //
     
    121122      this.addLineToChart.Click += new System.EventHandler(this.addLineToChart_Click);
    122123      //
     124      // addValuesButton
     125      //
     126      this.addValuesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     127      this.addValuesButton.Location = new System.Drawing.Point(281, 359);
     128      this.addValuesButton.Name = "addValuesButton";
     129      this.addValuesButton.Size = new System.Drawing.Size(133, 23);
     130      this.addValuesButton.TabIndex = 10;
     131      this.addValuesButton.Text = "Add Values to Results";
     132      this.addValuesButton.UseVisualStyleBackColor = true;
     133      this.addValuesButton.Click += new System.EventHandler(this.addValuesButton_Click);
     134      //
    123135      // RunCollectionStatisticalTabularView
    124136      //
     137      this.Controls.Add(this.addValuesButton);
    125138      this.Controls.Add(this.addLineToChart);
    126139      this.Controls.Add(this.dataRowComboBox);
     
    143156    private System.Windows.Forms.ComboBox dataTableComboBox;
    144157    private System.Windows.Forms.Button addLineToChart;
     158    private System.Windows.Forms.Button addValuesButton;
    145159  }
    146160}
Note: See TracChangeset for help on using the changeset viewer.