Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/14 13:26:18 (10 years ago)
Author:
pfleck
Message:
  • Merged trunk into preprocessing branch.
Location:
branches/DataPreprocessing
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing

  • branches/DataPreprocessing/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs

    r9910 r11009  
    122122        Invoke(new EventHandler(Content_Reset), sender, e);
    123123      else {
    124         this.categoricalMapping.Clear();
    125124        UpdateDataPoints();
    126125        UpdateAxisLabels();
     
    189188
    190189    private void UpdateDataPoints() {
     190      this.categoricalMapping.Clear();
    191191      this.chart.Series.Clear();
    192192      this.seriesCache.Clear();
     
    234234      }
    235235      matrix.ColumnNames = columnNames;
    236       matrix.RowNames = new string[] { "Count", "Minimum", "Maximum", "Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" };
     236      matrix.RowNames = new string[] { "Count", "Minimum", "Maximum", "Median", "Average", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" };
    237237
    238238      for (int i = 0; i < seriesCache.Count; i++) {
     
    242242        matrix[1, i] = seriesValues.Min();
    243243        matrix[2, i] = seriesValues.Max();
    244         matrix[3, i] = seriesValues.Average();
    245         matrix[4, i] = seriesValues.Median();
     244        matrix[3, i] = seriesValues.Median();
     245        matrix[4, i] = seriesValues.Average();
    246246        matrix[5, i] = seriesValues.StandardDeviation();
    247247        matrix[6, i] = seriesValues.Variance();
     
    325325      }
    326326    }
    327     private double GetCategoricalValue(int dimension, string value) {
     327    private double? GetCategoricalValue(int dimension, string value) {
    328328      if (!this.categoricalMapping.ContainsKey(dimension)) {
    329329        this.categoricalMapping[dimension] = new Dictionary<object, double>();
     
    336336        }
    337337      }
     338      if (!this.categoricalMapping[dimension].ContainsKey(value)) return null;
    338339      return this.categoricalMapping[dimension][value];
    339340    }
    340     private double GetValue(IRun run, AxisDimension axisDimension) {
    341       double value = double.NaN;
     341    private double? GetValue(IRun run, AxisDimension axisDimension) {
     342      double? value = double.NaN;
    342343      switch (axisDimension) {
    343344        case AxisDimension.Color: {
  • branches/DataPreprocessing/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs

    r9910 r11009  
    5656    private bool suppressUpdates = false;
    5757
    58     private RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true };
     58    private readonly RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true };
    5959
    6060    public RunCollectionBubbleChartView() {
     
    153153        if (suppressUpdates) return;
    154154
    155         foreach (var run in Content) UpdateRun(run);
    156         UpdateMarkerSizes();
    157         UpdateCursorInterval();
    158         chart.ChartAreas[0].RecalculateAxesScale();
     155        UpdateDataPoints();
    159156        UpdateAxisLabels();
    160157      }
     
    190187    protected override void OnContentChanged() {
    191188      base.OnContentChanged();
    192       this.categoricalMapping.Clear();
    193189      UpdateComboBoxes();
    194190      UpdateDataPoints();
    195191      UpdateCaption();
    196       RebuildInverseIndex();
    197192    }
    198193
     
    267262        Invoke(new EventHandler(Content_Reset), sender, e);
    268263      else {
    269         this.categoricalMapping.Clear();
    270         RebuildInverseIndex();
    271264        UpdateDataPoints();
    272265        UpdateAxisLabels();
     
    278271      series.Points.Clear();
    279272      runToDataPointMapping.Clear();
     273      categoricalMapping.Clear();
    280274      selectedRuns.Clear();
     275      RebuildInverseIndex();
    281276
    282277      chart.ChartAreas[0].AxisX.IsMarginVisible = xAxisValue != AxisDimension.Index.ToString();
     
    438433      }
    439434    }
    440     private double GetCategoricalValue(int dimension, string value) {
     435    private double? GetCategoricalValue(int dimension, string value) {
    441436      if (!this.categoricalMapping.ContainsKey(dimension)) {
    442437        this.categoricalMapping[dimension] = new Dictionary<object, double>();
     
    449444        }
    450445      }
     446      if (!this.categoricalMapping[dimension].ContainsKey(value)) return null;
    451447      return this.categoricalMapping[dimension][value];
    452448    }
     
    723719    }
    724720    private void hideRunsToolStripMenuItem_Click(object sender, EventArgs e) {
    725       HideRuns(selectedRuns);
     721      //ToList is necessary to prevent lazy evaluation
     722      HideRuns(selectedRuns.ToList());
    726723      //could not use ClearSelectedRuns as the runs are not visible anymore
    727724      selectedRuns.Clear();
    728725    }
    729726    private void hideRunsButton_Click(object sender, EventArgs e) {
    730       HideRuns(selectedRuns);
     727      //ToList is necessary to prevent lazy evaluation
     728      HideRuns(selectedRuns.ToList());
    731729      //could not use ClearSelectedRuns as the runs are not visible anymore
    732730      selectedRuns.Clear();
Note: See TracChangeset for help on using the changeset viewer.