Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/16 13:50:21 (8 years ago)
Author:
pfleck
Message:

#2709

  • Removed the PreprocessingDataTable and PreprocessingDataTableView and use dhe HL DatatTableControl instead.
  • Moved and refactored some code of PreprocessingChart and moved unnecessary code from base classes to actual derivative classes.
Location:
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/HistogramContent.cs

    r14185 r14459  
    3535    private const int MAX_DISTINCT_VALUES_FOR_CLASSIFCATION = 20;
    3636
    37     private int classifierVariableIndex = 0;
     37    public int ClassifierVariableIndex { get; set; }
    3838
    39     public int ClassifierVariableIndex {
    40       get { return this.classifierVariableIndex; }
    41       set { this.classifierVariableIndex = value; }
    42     }
    43     public bool IsDetailedChartViewEnabled { get; set; }
    44 
     39    public int Bins { get; set; }
     40    public bool ExactBins { get; set; }
    4541
    4642    public HistogramContent(IFilteredPreprocessingData preprocessingData)
    4743      : base(preprocessingData) {
    48       AllInOneMode = false;
     44      Bins = 10;
     45      ExactBins = false;
    4946    }
    5047
     
    7067      return doubleVariableNames;
    7168    }
    72 
    7369  }
    7470}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/LineChartContent.cs

    r14185 r14459  
    2929  public class LineChartContent : PreprocessingChartContent {
    3030
     31    private bool allInOneMode = true;
     32    public bool AllInOneMode {
     33      get { return this.allInOneMode; }
     34      set { this.allInOneMode = value; }
     35    }
     36
    3137    public static new Image StaticItemImage {
    3238      get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; }
     
    3945    public LineChartContent(LineChartContent content, Cloner cloner)
    4046      : base(content, cloner) {
     47      this.allInOneMode = content.allInOneMode;
    4148    }
    4249    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs

    r14418 r14459  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    2423using System.Drawing;
     
    3332    public static new Image StaticItemImage {
    3433      get { return HeuristicLab.Common.Resources.VSImageLibrary.PieChart; }
    35     }
    36 
    37     private bool allInOneMode = true;
    38     public bool AllInOneMode {
    39       get { return this.allInOneMode; }
    40       set { this.allInOneMode = value; }
    4134    }
    4235
     
    5548    public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner)
    5649      : base(content, cloner) {
    57       this.allInOneMode = content.allInOneMode;
    5850      this.PreprocessingData = content.PreprocessingData;
    5951      this.variableItemList = cloner.Clone<ICheckedItemList<StringValue>>(variableItemList);
     
    6254      return new PreprocessingChartContent(this, cloner);
    6355    }
    64 
    6556
    6657    public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
     
    7162    }
    7263
    73     public List<DataRow> CreateAllDataRows(DataRowVisualProperties.DataRowChartType chartType) {
    74       List<DataRow> dataRows = new List<DataRow>();
    75       foreach (var name in PreprocessingData.GetDoubleVariableNames())
    76         dataRows.Add(CreateDataRow(name, chartType));
    77       return dataRows;
    78     }
    7964
    80     public DataRow CreateSelectedDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
    81 
    82       IDictionary<int, IList<int>> selection = PreprocessingData.Selection;
    83       int variableIndex = PreprocessingData.GetColumnIndex(variableName);
    84 
    85       if (selection.Keys.Contains(variableIndex)) {
    86         List<int> selectedIndices = new List<int>(selection[variableIndex]);
    87         //need selection with more than 1 value
    88         if (selectedIndices.Count < 2)
    89           return null;
    90 
    91         selectedIndices.Sort();
    92         int start = selectedIndices[0];
    93         int end = selectedIndices[selectedIndices.Count - 1];
    94 
    95         DataRow rowSelect = CreateDataRowRange(variableName, start, end, chartType);
    96         return rowSelect;
    97       } else
    98         return null;
    99     }
    100 
    101     public DataRow CreateDataRowRange(string variableName, int start, int end, DataRowVisualProperties.DataRowChartType chartType) {
    102       IList<double> values = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableName));
    103       IList<double> valuesRange = new List<double>();
    104       for (int i = 0; i < values.Count; i++) {
    105         if (i >= start && i <= end)
    106           valuesRange.Add(values[i]);
    107         else
    108           valuesRange.Add(Double.NaN);
    109       }
    110 
    111       DataRow row = new DataRow(variableName, "", valuesRange);
    112       row.VisualProperties.ChartType = chartType;
    113       return row;
    114     }
    115 
    116     public List<DataRow> CreateAllSelectedDataRows(DataRowVisualProperties.DataRowChartType chartType) {
    117       List<DataRow> dataRows = new List<DataRow>();
    118       foreach (var name in PreprocessingData.GetDoubleVariableNames()) {
    119         DataRow row = CreateSelectedDataRow(name, chartType);
    120         if (row != null)
    121           dataRows.Add(row);
    122       }
    123       return dataRows;
    124     }
    12565
    12666
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj

    r14445 r14459  
    126126    <Compile Include="Content\PreprocessingChartContent.cs" />
    127127    <Compile Include="Data\PreprocessingData.cs" />
    128     <Compile Include="Content\PreprocessingDataTable.cs" />
    129128    <Compile Include="Content\IViewChartShortcut.cs" />
    130129    <Compile Include="Data\IFilteredPreprocessingData.cs" />
Note: See TracChangeset for help on using the changeset viewer.