Changeset 14996


Ignore:
Timestamp:
05/18/17 12:29:59 (4 years ago)
Author:
pfleck
Message:

#2709

  • Fixed initial selection of the grouping text box (empty string instead of null to select the first entry).
  • General code fixes (removed unnessecary bank lines and code, class member order, ...)
Location:
branches/DataPreprocessing Enhancements
Files:
45 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.cs

    r14185 r14996  
    2121
    2222using System;
    23 using System.Windows.Forms;
    2423using HeuristicLab.Core;
    2524using HeuristicLab.Core.Views;
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/CheckedTransformationListView.cs

    r14185 r14996  
    3232namespace HeuristicLab.DataPreprocessing.Views {
    3333  [View("CheckedTransformationList View")]
    34   //[Content(typeof(RunCollectionConstraintCollection), true)]
    3534  [Content(typeof(ICheckedItemList<ITransformation>), false)]
    3635  public partial class CheckedTransformationListView : CheckedItemListView<ITransformation> {
    37 
    3836    public CheckedTransformationListView() {
    3937      InitializeComponent();
     
    5654
    5755          return (ITransformation)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(new[] { columnNames });
    58         }
    59         catch (Exception ex) {
     56        } catch (Exception ex) {
    6057          ErrorHandling.ShowErrorDialog(this, ex);
    6158        }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ComparisonFilterView.cs

    r14185 r14996  
    3232  [Content(typeof(ComparisonFilter), false)]
    3333  public partial class ComparisonFilterView : ItemView {
    34     public ComparisonFilterView() {
    35       InitializeComponent();
    36     }
    37 
    3834    public new ComparisonFilter Content {
    3935      get { return (ComparisonFilter)base.Content; }
     
    4137    }
    4238
     39    public ComparisonFilterView() {
     40      InitializeComponent();
     41    }
    4342
    4443    protected override void OnContentChanged() {
    4544      base.OnContentChanged();
    46       cbAttr.Items.Clear(); //cmbConstraintColumn.Items.Clear();
    47       cbFilterOperation.Items.Clear(); //cmbConstraintOperation.Items.Clear();
     45      cbAttr.Items.Clear();
     46      cbFilterOperation.Items.Clear();
    4847      tbFilterData.Text = string.Empty;
    4948      if (Content != null) {
     
    121120    }
    122121
    123 
    124122    protected virtual void Content_ComparisonOperationChanged(object sender, EventArgs e) {
    125123      if (Content.ConstraintOperation != (ConstraintOperation)this.cbFilterOperation.SelectedItem)
     
    178176        errorProvider.Clear();
    179177    }
    180 
    181178  }
    182179}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs

    r14462 r14996  
    2424using System.Drawing;
    2525using System.Linq;
    26 using System.Windows.Forms;
    2726using System.Windows.Forms.DataVisualization.Charting;
    2827using HeuristicLab.Core.Views;
     
    3029
    3130namespace HeuristicLab.DataPreprocessing.Views {
    32 
    3331  [View("Histogram View")]
    3432  [Content(typeof(DataCompletenessChartContent), true)]
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs

    r14723 r14996  
    3333  [Content(typeof(DataGridContent), true)]
    3434  public partial class DataGridContentView : StringConvertibleMatrixView {
    35 
    3635    private bool isSearching = false;
    3736    private bool updateOnMouseUp = false;
     
    8180        base.Sort();
    8281      }
    83 
    8482    }
    8583
     
    141139      }
    142140    }
    143 
    144141
    145142    protected override void PasteValuesToDataGridView() {
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs

    r14903 r14996  
    3636  [Content(typeof(PreprocessingContext), true)]
    3737  public partial class DataPreprocessingView : NamedItemView {
    38 
    39     public DataPreprocessingView() {
    40       InitializeComponent();
    41     }
    42 
    4338    public new PreprocessingContext Content {
    4439      get { return (PreprocessingContext)base.Content; }
    4540      set { base.Content = value; }
     41    }
     42
     43    public DataPreprocessingView() {
     44      InitializeComponent();
    4645    }
    4746
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs

    r14185 r14996  
    2929namespace HeuristicLab.DataPreprocessing.Views {
    3030  public class DataPreprocessorStarter : IDataPreprocessorStarter {
    31 
    3231    public void Start(IDataAnalysisProblemData problemData, IContentView currentView) {
    3332      IAlgorithm algorithm;
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs

    r14185 r14996  
    3232  [Content(typeof(FilterContent), true)]
    3333  public partial class FilterView : ItemView {
     34    public new FilterContent Content {
     35      get { return (FilterContent)base.Content; }
     36      set { base.Content = value; }
     37    }
    3438
    3539    public FilterView() {
     
    4549      checkedFilterView.Content.ItemsRemoved += Content_ItemsRemoved;
    4650      checkedFilterView.Content.CheckedItemsChanged += Content_CheckedItemsChanged;
    47     }
    48 
    49     public new FilterContent Content {
    50       get { return (FilterContent)base.Content; }
    51       set { base.Content = value; }
    5251    }
    5352
     
    122121      }
    123122    }
    124 
    125123  }
    126124}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs

    r14993 r14996  
    2828  [Content(typeof(HistogramContent), true)]
    2929  public partial class HistogramView : PreprocessingChartView {
    30 
    3130    public new HistogramContent Content {
    3231      get { return (HistogramContent)base.Content; }
     
    4443    protected override void OnContentChanged() {
    4544      base.OnContentChanged();
    46       classifierComboBox.Items.Clear();
    47       classifierComboBox.Items.Add("");
     45      groupingComboBox.Items.Clear();
     46      groupingComboBox.Items.Add(string.Empty);
    4847
    4948      if (Content != null) {
    5049        foreach (string var in PreprocessingChartContent.GetVariableNamesForGrouping(Content.PreprocessingData)) {
    51           classifierComboBox.Items.Add(var);
     50          groupingComboBox.Items.Add(var);
    5251        }
    5352
    54         classifierComboBox.SelectedItem = Content.GroupingVariableName;
     53        groupingComboBox.SelectedItem = Content.GroupingVariableName ?? string.Empty;
    5554      }
    5655    }
     
    6261
    6362    private void classifierComboBox_SelectedIndexChanged(object sender, EventArgs e) {
    64       Content.GroupingVariableName = classifierComboBox.SelectedItem.ToString();
     63      Content.GroupingVariableName = groupingComboBox.SelectedItem.ToString();
    6564
    6665      // rebuild datatables
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.cs

    r14983 r14996  
    3131
    3232namespace HeuristicLab.DataPreprocessing.Views {
    33 
    3433  [View("Line Chart View")]
    3534  [Content(typeof(LineChartContent), true)]
    3635  public partial class LineChartView : PreprocessingChartView {
    37 
    3836    protected Dictionary<string, DataRow> allInOneDataRows;
    3937    protected DataTable allInOneDataTable;
    4038    protected DataTableView allInOneDataTableView;
     39
     40    public new LineChartContent Content {
     41      get { return (LineChartContent)base.Content; }
     42      set { base.Content = value; }
     43    }
    4144
    4245    public LineChartView() {
     
    4649      allInOneDataRows = new Dictionary<string, DataRow>();
    4750      allInOneDataTable = new DataTable();
    48     }
    49 
    50     public new LineChartContent Content {
    51       get { return (LineChartContent)base.Content; }
    52       set { base.Content = value; }
    5351    }
    5452
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs

    r14185 r14996  
    3131
    3232namespace HeuristicLab.DataPreprocessing.Views {
    33 
    3433  [View("Manipulation Chart View")]
    3534  [Content(typeof(ManipulationContent), true)]
    3635  public partial class ManipulationView : ItemView {
    37 
    3836    private Action[] validators;
    3937    private Action[] manipulations;
     38
     39    public new ManipulationContent Content {
     40      get { return (ManipulationContent)base.Content; }
     41      set { base.Content = value; }
     42    }
    4043
    4144    public ManipulationView() {
     
    4952      tabsPreview.SizeMode = TabSizeMode.Fixed;
    5053
    51       validators = new Action[] { 
    52         ()=>validateDeleteColumnsInfo(),
    53         ()=>validateDeleteColumnsVariance(),
    54         ()=>validateDeleteRowsInfo(),
    55         ()=>validateReplaceWith(),
    56         ()=>validateShuffle()
     54      validators = new Action[] {
     55        () => ValidateDeleteColumnsInfo(),
     56        () => ValidateDeleteColumnsVariance(),
     57        () => ValidateDeleteRowsInfo(),
     58        () => ValidateReplaceWith(),
     59        () => ValidateShuffle()
    5760      };
    5861
    59       manipulations = new Action[] { 
    60         ()=>Content.ManipulationLogic.DeleteColumnsWithMissingValuesGreater(getDeleteColumnsInfo()),
    61         ()=>Content.ManipulationLogic.DeleteColumnsWithVarianceSmaller(getDeleteColumnsVariance()),
    62         ()=>Content.ManipulationLogic.DeleteRowsWithMissingValuesGreater(getRowsColumnsInfo()),
    63         ()=>replaceMissingValues(),
    64         ()=>Content.ManipulationLogic.Shuffle(shuffleSeparatelyCheckbox.Checked)
     62      manipulations = new Action[] {
     63        () => Content.ManipulationLogic.DeleteColumnsWithMissingValuesGreater(GetDeleteColumnsInfo()),
     64        () => Content.ManipulationLogic.DeleteColumnsWithVarianceSmaller(GetDeleteColumnsVariance()),
     65        () => Content.ManipulationLogic.DeleteRowsWithMissingValuesGreater(GetRowsColumnsInfo()),
     66        () => ReplaceMissingValues(),
     67        () => Content.ManipulationLogic.Shuffle(shuffleSeparatelyCheckbox.Checked)
    6568      };
    6669    }
     
    111114    }
    112115
    113     private double getDeleteColumnsInfo() {
     116    private double GetDeleteColumnsInfo() {
    114117      return double.Parse(txtDeleteColumnsInfo.Text);
    115118    }
    116119
    117     private double getDeleteColumnsVariance() {
     120    private double GetDeleteColumnsVariance() {
    118121      return double.Parse(txtDeleteColumnsVariance.Text);
    119122    }
    120123
    121     private double getRowsColumnsInfo() {
     124    private double GetRowsColumnsInfo() {
    122125      return double.Parse(txtDeleteRowsInfo.Text);
    123126    }
    124127
    125     private void replaceMissingValues() {
     128    private void ReplaceMissingValues() {
    126129      var allIndices = Content.SearchLogic.GetMissingValueIndices();
    127130      var columnIndex = cmbVariableNames.SelectedIndex;
     
    149152    }
    150153
    151     private void validateDeleteColumnsInfo() {
    152       validateDoubleTextBox(txtDeleteColumnsInfo.Text);
     154    private void ValidateDeleteColumnsInfo() {
     155      ValidateDoubleTextBox(txtDeleteColumnsInfo.Text);
    153156      if (btnApply.Enabled) {
    154         var filteredColumns = Content.ManipulationLogic.ColumnsWithMissingValuesGreater(getDeleteColumnsInfo());
     157        var filteredColumns = Content.ManipulationLogic.ColumnsWithMissingValuesGreater(GetDeleteColumnsInfo());
    155158        int count = filteredColumns.Count;
    156159        int columnCount = Content.FilterLogic.PreprocessingData.Columns;
     
    180183    }
    181184
    182     private void validateDeleteColumnsVariance() {
    183       validateDoubleTextBox(txtDeleteColumnsVariance.Text);
     185    private void ValidateDeleteColumnsVariance() {
     186      ValidateDoubleTextBox(txtDeleteColumnsVariance.Text);
    184187      if (btnApply.Enabled) {
    185         var filteredColumns = Content.ManipulationLogic.ColumnsWithVarianceSmaller(getDeleteColumnsVariance());
     188        var filteredColumns = Content.ManipulationLogic.ColumnsWithVarianceSmaller(GetDeleteColumnsVariance());
    186189        int count = filteredColumns.Count;
    187190        int columnCount = Content.FilterLogic.PreprocessingData.Columns;
     
    211214    }
    212215
    213     private void validateDeleteRowsInfo() {
    214       validateDoubleTextBox(txtDeleteRowsInfo.Text);
     216    private void ValidateDeleteRowsInfo() {
     217      ValidateDoubleTextBox(txtDeleteRowsInfo.Text);
    215218      if (btnApply.Enabled) {
    216         int count = Content.ManipulationLogic.RowsWithMissingValuesGreater(getRowsColumnsInfo()).Count;
     219        int count = Content.ManipulationLogic.RowsWithMissingValuesGreater(GetRowsColumnsInfo()).Count;
    217220        int rowCount = Content.FilterLogic.PreprocessingData.Rows;
    218221        lblPreviewRowsInfo.Text = count + " row" + (count > 1 || count == 0 ? "s" : "") + " of " + rowCount + " (" + string.Format("{0:F2}%", 100d / rowCount * count) + ") were detected with more than " + txtDeleteRowsInfo.Text + "% missing values.";
     
    227230    }
    228231
    229     private void validateReplaceWith() {
     232    private void ValidateReplaceWith() {
    230233      btnApply.Enabled = false;
    231234      string replaceWith = (string)cmbReplaceWith.SelectedItem;
     
    260263    }
    261264
    262     private void validateShuffle() {
     265    private void ValidateShuffle() {
    263266      btnApply.Enabled = true;
    264267      lblShuffleProperties.Enabled = false;
     
    268271    }
    269272
    270     public new ManipulationContent Content {
    271       get { return (ManipulationContent)base.Content; }
    272       set { base.Content = value; }
    273     }
    274 
    275273    private void lstMethods_SelectedIndexChanged(object sender, System.EventArgs e) {
    276274      int index = lstMethods.SelectedIndex;
     
    308306    }
    309307
    310     private void validateDoubleTextBox(String text) {
     308    private void ValidateDoubleTextBox(String text) {
    311309      btnApply.Enabled = false;
    312310      if (!string.IsNullOrEmpty(text)) {
     
    319317
    320318    private void txtDeleteColumnsInfo_TextChanged(object sender, EventArgs e) {
    321       validateDeleteColumnsInfo();
     319      ValidateDeleteColumnsInfo();
    322320    }
    323321
    324322    private void txtDeleteColumnsVariance_TextChanged(object sender, EventArgs e) {
    325       validateDeleteColumnsVariance();
     323      ValidateDeleteColumnsVariance();
    326324    }
    327325
    328326    private void txtDeleteRowsInfo_TextChanged(object sender, EventArgs e) {
    329       validateDeleteRowsInfo();
     327      ValidateDeleteRowsInfo();
    330328    }
    331329
     
    334332      lblValueColon.Visible = isReplaceWithValueSelected;
    335333      txtReplaceValue.Visible = isReplaceWithValueSelected;
    336       validateReplaceWith();
     334      ValidateReplaceWith();
    337335    }
    338336
    339337    private void txtReplaceValue_TextChanged(object sender, EventArgs e) {
    340       validateReplaceWith();
     338      ValidateReplaceWith();
    341339    }
    342340  }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs

    r14983 r14996  
    4747    };
    4848
    49 
    5049    public PreprocessingChartView() {
    5150      InitializeComponent();
     
    8988      base.CheckedItemsChanged(sender, checkedItems);
    9089
    91       foreach (IndexedItem<StringValue> item in checkedItems.Items) {
    92         string variableName = item.Value.Value;
    93 
    94         if (!IsVariableChecked(variableName)) {
    95           // not checked -> remove
    96           //dataTableView.SetRowEnabled(variableName, false);
    97           //dataTablePerVariable.Remove(dataTablePerVariable.Find(x => (x.Name == variableName)));
    98         } else {
    99           // checked -> add
    100           //DataRow row = GetDataRow(variableName);
    101           //dataTableView.SetRowEnabled(variableName, true);
    102 
    103           //var pdt = new DataTable(variableName);
    104           //pdt.VisualProperties.Title = string.Empty;
    105           //pdt.Rows.Add(row);
    106           // dataTablePerVariable does not contain unchecked variables => reduce insert position by number of uncheckt variables to correct the index
    107           //int uncheckedUntilVariable = checkedItemList.Content.TakeWhile(x => x.Value != variableName).Count(x => !checkedItemList.Content.ItemChecked(x));
    108           //dataTables.Insert(item.Index - uncheckedUntilVariable, pdt);
    109         }
    110       }
    111 
    112       // update chart if not in all in one mode
    113       //if (Content != null && !Content.AllInOneMode)
    114       //GenerateChart();??
    11590      GenerateLayout();
    11691    }
     
    153128    #region Generate Layout
    154129    protected void GenerateLayout() {
    155       if (suppressCheckedChangedUpdate)
     130      if (SuppressCheckedChangedUpdate)
    156131        return;
    157132
     
    192167
    193168    private void AddDataTableToTableLayout(DataTableView dataTable, int row, int col) {
    194       //dataView.Classification = Classification;
    195       //dataView.IsDetailedChartViewEnabled = IsDetailedChartViewEnabled;
    196 
    197169      if (dataTable == null) {
    198170        // dummy panel for empty field
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.cs

    r14917 r14996  
    3333  [Content(typeof(PreprocessingChartContent), false)]
    3434  public partial class PreprocessingCheckedVariablesView : ItemView {
    35 
    36     protected bool suppressCheckedChangedUpdate = false;
     35    protected bool SuppressCheckedChangedUpdate = false;
    3736
    3837    public new PreprocessingChartContent Content {
     
    122121        Content.VariableItemList.Remove(stringValue);
    123122    }
    124     protected virtual void UpdateVariable(string name) {
    125     }
    126     protected virtual void ResetAllVariables() {
    127     }
    128 
    129     protected virtual void CheckedChangedUpdate() {
    130 
    131     }
     123    protected virtual void UpdateVariable(string name) { }
     124    protected virtual void ResetAllVariables() { }
     125    protected virtual void CheckedChangedUpdate() { }
    132126
    133127    private void checkInputsTargetButton_Click(object sender, System.EventArgs e) {
    134       suppressCheckedChangedUpdate = true;
     128      SuppressCheckedChangedUpdate = true;
    135129      foreach (var name in Content.VariableItemList) {
    136130        var isInputTarget = Content.PreprocessingData.InputVariables.Contains(name.Value) || Content.PreprocessingData.TargetVariable == name.Value;
    137131        Content.VariableItemList.SetItemCheckedState(name, isInputTarget);
    138132      }
    139       suppressCheckedChangedUpdate = false;
     133      SuppressCheckedChangedUpdate = false;
    140134      CheckedChangedUpdate();
    141135    }
    142136
    143137    private void checkAllButton_Click(object sender, System.EventArgs e) {
    144       suppressCheckedChangedUpdate = true;
     138      SuppressCheckedChangedUpdate = true;
    145139      foreach (var name in Content.VariableItemList) {
    146140        Content.VariableItemList.SetItemCheckedState(name, true);
    147141      }
    148       suppressCheckedChangedUpdate = false;
     142      SuppressCheckedChangedUpdate = false;
    149143      CheckedChangedUpdate();
    150144    }
    151145
    152146    private void uncheckAllButton_Click(object sender, System.EventArgs e) {
    153       suppressCheckedChangedUpdate = true;
     147      SuppressCheckedChangedUpdate = true;
    154148      foreach (var name in Content.VariableItemList) {
    155149        Content.VariableItemList.SetItemCheckedState(name, false);
    156150      }
    157       suppressCheckedChangedUpdate = false;
     151      SuppressCheckedChangedUpdate = false;
    158152      CheckedChangedUpdate();
    159153    }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs

    r14994 r14996  
    3030  [Content(typeof(CorrelationMatrixContent), true)]
    3131  public partial class PreprocessingFeatureCorrelationView : AsynchronousContentView {
    32 
    3332    public new CorrelationMatrixContent Content {
    3433      get { return (CorrelationMatrixContent)base.Content; }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/RenameColumnsDialog.cs

    r14185 r14996  
    2626namespace HeuristicLab.DataPreprocessing.Views {
    2727  public partial class RenameColumnsDialog : Form {
    28 
    2928    public IList<string> ColumnNames {
    3029      get {
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs

    r14993 r14996  
    4242    private readonly IDictionary<Tuple<string/*col*/, string/*row*/>, Control> bodyCache = new Dictionary<Tuple<string, string>, Control>();
    4343
     44    public new MultiScatterPlotContent Content {
     45      get { return (MultiScatterPlotContent)base.Content; }
     46      set { base.Content = value; }
     47    }
     48
    4449    public ScatterPlotMultiView() {
    4550      InitializeComponent();
     
    7883    }
    7984
    80     public new MultiScatterPlotContent Content {
    81       get { return (MultiScatterPlotContent)base.Content; }
    82       set { base.Content = value; }
    83     }
    84 
    8585    protected override void OnContentChanged() {
    8686      base.OnContentChanged();
    8787      if (Content != null) {
    88         groupingComboBox.Items.Add("");
     88        groupingComboBox.Items.Add(string.Empty);
    8989        foreach (string var in PreprocessingChartContent.GetVariableNamesForGrouping(Content.PreprocessingData)) {
    9090          groupingComboBox.Items.Add(var);
    9191        }
    92         groupingComboBox.SelectedItem = Content.GroupingVariable;
     92        groupingComboBox.SelectedItem = Content.GroupingVariable ?? string.Empty;
    9393
    9494        // uncheck variables that max 20 vars are selected initially
     
    100100            numChecked, numChecked * numChecked);
    101101          if (MessageBox.Show(this, message, "Reduce befor continue?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) {
    102             suppressCheckedChangedUpdate = true;
     102            SuppressCheckedChangedUpdate = true;
    103103            foreach (var var in list.CheckedItems.Reverse().Take(numChecked - 20)) {
    104104              Content.VariableItemList.SetItemCheckedState(var.Value, false);
    105105            }
    106             suppressCheckedChangedUpdate = false;
     106            SuppressCheckedChangedUpdate = false;
    107107          }
    108108        }
     
    123123    protected override void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<StringValue>> checkedItems) {
    124124      base.CheckedItemsChanged(sender, checkedItems);
    125       if (suppressCheckedChangedUpdate) return;
     125      if (SuppressCheckedChangedUpdate) return;
    126126
    127127      foreach (var variable in checkedItems.Items) {
     
    207207      // hide controls
    208208      for (int r = 0; r < tlp.RowCount; r++) {
    209         //tlp.Controls.Remove(tlp.GetControlFromPosition(idx, r));
    210209        var control = tlp.GetControlFromPosition(idx, r);
    211210        if (control != null)
     
    217216      // hide controls
    218217      for (int c = 0; c < tlp.ColumnCount; c++) {
    219         //tlp.Controls.Remove(tlp.GetControlFromPosition(c, idx));
    220218        var control = tlp.GetControlFromPosition(c, idx);
    221219        if (control != null)
     
    426424            Dock = DockStyle.Fill,
    427425            ShowName = false
    428             //ShowLegend = false,
    429             //XAxisFormat = "G3"
    430426          };
    431           //pcv.ChartDoubleClick += HistogramDoubleClick;
     427          //pcv.ChartDoubleClick += HistogramDoubleClick;  // ToDo: not working; double click is already handled by the chart
    432428          bodyCache.Add(key, pcv);
    433429        } else { //scatter plot
     
    473469    #region Generate Charts
    474470    private void GenerateCharts(bool clearCache) {
    475       if (Content == null || suppressCheckedChangedUpdate) return;
     471      if (Content == null || SuppressCheckedChangedUpdate) return;
    476472
    477473      // Clear old layouts and cache
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs

    r14993 r14996  
    2828using HeuristicLab.Core.Views;
    2929using HeuristicLab.MainForm;
    30 using HeuristicLab.MainForm.WindowsForms;
    3130using RegressionType = HeuristicLab.Analysis.ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType;
    3231
     
    7877        comboBoxGroup.Items.Add(var);
    7978      }
    80       comboBoxGroup.SelectedItem = Content.GroupingVariable;
     79      comboBoxGroup.SelectedItem = Content.GroupingVariable ?? NoGroupItem;
    8180
    8281      // use x and y variable from content
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.cs

    r14185 r14996  
    4343
    4444  public partial class SearchAndReplaceDialog : Form {
    45     private string[] cmbItemsText = { "Value", "Average", "Median", "Random", "Most Common", "Interpolation" };
    46     private string[] cmbComparisonOperatorText = { "==", "<", "<=", ">", ">=", "!=" };
     45    private static readonly string[] ItemsText = { "Value", "Average", "Median", "Random", "Most Common", "Interpolation" };
     46    private static readonly string[] ComparisonOperatorText = { "==", "<", "<=", ">", ">=", "!=" };
    4747
    4848    public SearchAndReplaceDialog() {
    4949      InitializeComponent();
    50       cmbReplaceWith.Items.AddRange(cmbItemsText);
     50      cmbReplaceWith.Items.AddRange(ItemsText);
    5151      cmbReplaceWith.SelectedIndex = (int)ReplaceAction.Value;
    52       cmbComparisonOperator.Items.AddRange(cmbComparisonOperatorText);
     52      cmbComparisonOperator.Items.AddRange(ComparisonOperatorText);
    5353      cmbComparisonOperator.SelectedIndex = (int)ComparisonOperation.Equal;
    5454    }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs

    r14915 r14996  
    3131
    3232namespace HeuristicLab.DataPreprocessing.Views {
    33 
    3433  [View("Statistics View")]
    3534  [Content(typeof(StatisticsContent), true)]
    3635  public partial class StatisticsView : ItemView {
    37 
    3836    private bool horizontal = true;
    39 
    4037    private StringMatrix statisticsMatrix;
    41 
    4238    private static readonly string[] StatisticsNames = new[] {
    4339      "Type",
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/TransformationView.cs

    r14185 r14996  
    2828
    2929namespace HeuristicLab.DataPreprocessing.Views {
    30 
    3130  [View("Transformation View")]
    3231  [Content(typeof(TransformationContent), true)]
    3332  public partial class TransformationView : AsynchronousContentView {
    34 
    3533    public new TransformationContent Content {
    3634      get { return (TransformationContent)base.Content; }
     
    5250    }
    5351
    54     /// <summary>
    55     /// Adds eventhandlers to the current instance.
    56     /// </summary>
    5752    protected override void RegisterContentEvents() {
    5853      Content.FilterLogic.FilterChanged += FilterLogic_FilterChanged;
    5954    }
    6055
    61     /// <summary>
    62     /// Removes the eventhandlers from the current instance.
    63     /// </summary>
    6456    protected override void DeregisterContentEvents() {
    6557      Content.FilterLogic.FilterChanged -= FilterLogic_FilterChanged;
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/Utils/FindPreprocessingItemsIterator.cs

    r14185 r14996  
    2626namespace HeuristicLab.DataPreprocessing.Views {
    2727  class FindPreprocessingItemsIterator : IFindPreprocessingItemsIterator {
    28 
    2928    private IDictionary<int, IList<int>> items;
    3029    private Tuple<int, int> currentCell;
     
    3231    public FindPreprocessingItemsIterator(IDictionary<int, IList<int>> items) {
    3332      this.items = items;
    34       Reset(); 
     33      Reset();
    3534    }
    3635
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.cs

    r14470 r14996  
    2929  [Content(typeof(IItemList<IViewShortcut>), true)]
    3030  public partial class ViewShortcutListView : ItemListView<IViewShortcut> {
    31 
    3231    public ViewShortcutListView() {
    3332      InitializeComponent();
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/CorrelationMatrixContent.cs

    r14994 r14996  
    3232    }
    3333
    34     private PreprocessingContext Context { get; set; }
     34    public PreprocessingContext Context { get; private set; }
    3535    public ITransactionalPreprocessingData PreprocessingData {
    3636      get { return Context.Data; }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/DataCompletenessChartContent.cs

    r14903 r14996  
    3232    }
    3333
    34     //public DataGridLogic DataGridLogic { get; private set; }
    3534    public SearchLogic SearchLogic { get; private set; }
    3635
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/DataGridContent.cs

    r14903 r14996  
    3232  [Item("Data Grid", "Represents a data grid.")]
    3333  public class DataGridContent : Item, IStringConvertibleMatrix, IViewShortcut {
    34 
    35     public ITransactionalPreprocessingData PreProcessingData { get; private set; }
    36 
    3734    public static new Image StaticItemImage {
    3835      get { return HeuristicLab.Common.Resources.VSImageLibrary.Table; }
    3936    }
     37
     38    public ITransactionalPreprocessingData PreProcessingData { get; private set; }
    4039
    4140    public ManipulationLogic ManipulationLogic { get; private set; }
     
    4342
    4443    public int Rows {
    45       get {
    46         return PreProcessingData.Rows;
    47       }
    48       set {
    49         //does nothing
    50       }
     44      get { return PreProcessingData.Rows; }
     45      set { }
    5146    }
    5247
    5348    public int Columns {
    54       get {
    55         return PreProcessingData.Columns;
    56       }
    57       set {
    58         //does nothing
    59       }
     49      get { return PreProcessingData.Columns; }
     50      set { }
    6051    }
    6152
    6253    public IEnumerable<string> ColumnNames {
    63       get {
    64         return PreProcessingData.VariableNames;
    65       }
    66       set {
    67 
    68       }
     54      get { return PreProcessingData.VariableNames; }
     55      set { }
    6956    }
    7057
    7158    public IEnumerable<string> RowNames {
    72       get {
    73         return Enumerable.Range(1, Rows).Select(n => n.ToString());
    74       }
    75       set {
    76         throw new NotSupportedException();
    77       }
     59      get { return Enumerable.Range(1, Rows).Select(n => n.ToString()); }
     60      set { throw new NotSupportedException(); }
    7861    }
    7962
    8063    public bool SortableView {
    81       get {
    82         return true;
    83       }
    84       set {
    85         throw new NotSupportedException();
    86       }
     64      get { return true; }
     65      set { throw new NotSupportedException(); }
    8766    }
    8867
     
    9170    }
    9271
    93 
    9472    public IDictionary<int, IList<int>> Selection {
    9573      get { return PreProcessingData.Selection; }
    9674      set { PreProcessingData.Selection = value; }
    9775    }
    98 
    9976
    10077    public DataGridContent(ITransactionalPreprocessingData preProcessingData, ManipulationLogic theManipulationLogic, FilterLogic theFilterLogic) {
     
    137114    }
    138115
    139 
    140116    #region unused stuff/not implemented but necessary due to IStringConvertibleMatrix
    141117#pragma warning disable 0067
     
    154130    public event EventHandler<EventArgs<int, int>> ItemChanged;
    155131    public event EventHandler Reset;
    156 
    157132#pragma warning restore 0067
    158133    #endregion
    159 
    160134  }
    161135}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/FilterContent.cs

    r14185 r14996  
    2828  [Item("Filter", "Represents the filter grid.")]
    2929  public class FilterContent : Item, IViewShortcut {
    30 
    3130    public static new Image StaticItemImage {
    3231      get { return HeuristicLab.Common.Resources.VSImageLibrary.Filter; }
    3332    }
    3433
    35     private ICheckedItemCollection<IFilter> filters = new CheckedItemCollection<IFilter>();
    36 
    3734    public FilterLogic FilterLogic { get; private set; }
    3835
    39     public ICheckedItemCollection<IFilter> Filters {
    40       get {
    41         return this.filters;
    42       }
    43       set {
    44         this.filters = value;
    45       }
    46     }
     36    public ICheckedItemCollection<IFilter> Filters { get; private set; }
    4737
    48     private bool isAndCombination = true;
    49     public bool IsAndCombination {
    50       get {
    51         return this.isAndCombination;
    52       }
    53       set {
    54         this.isAndCombination = value;
    55       }
    56     }
     38    public bool IsAndCombination { get; set; }
    5739
    5840    public FilterContent(FilterLogic filterLogic) {
     41      Filters = new CheckedItemCollection<IFilter>();
     42      IsAndCombination = true;
    5943      FilterLogic = filterLogic;
    6044    }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/LineChartContent.cs

    r14903 r14996  
    2828  [Item("Line Chart", "Represents the line chart grid.")]
    2929  public class LineChartContent : PreprocessingChartContent {
    30 
    31     private bool allInOneMode = true;
    32     public bool AllInOneMode {
    33       get { return this.allInOneMode; }
    34       set { this.allInOneMode = value; }
    35     }
     30    public bool AllInOneMode { get; set; }
    3631
    3732    public static new Image StaticItemImage {
     
    4136    public LineChartContent(IFilteredPreprocessingData preprocessingData)
    4237      : base(preprocessingData) {
     38      AllInOneMode = true;
    4339    }
    4440
    4541    public LineChartContent(LineChartContent content, Cloner cloner)
    4642      : base(content, cloner) {
    47       this.allInOneMode = content.allInOneMode;
     43      this.AllInOneMode = content.AllInOneMode;
    4844    }
    4945    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/ManipulationContent.cs

    r14185 r14996  
    2828  [Item("Manipulation", "Represents the available manipulations on a data set.")]
    2929  public class ManipulationContent : Item, IViewShortcut {
    30 
    31     private ManipulationLogic manipulationLogic;
    32     private SearchLogic searchLogic;
    33     private FilterLogic filterLogic;
    34 
    35     public ManipulationLogic ManipulationLogic { get { return manipulationLogic; } }
    36     public SearchLogic SearchLogic { get { return searchLogic; } }
    37     public FilterLogic FilterLogic { get { return filterLogic; } }
    38 
    3930    public static new Image StaticItemImage {
    4031      get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
    4132    }
    4233
    43     public ManipulationContent(ManipulationLogic theManipulationLogic, SearchLogic theSearchLogic, FilterLogic theFilterLogic) {
    44       manipulationLogic = theManipulationLogic;
    45       searchLogic = theSearchLogic;
    46       filterLogic = theFilterLogic;
     34    public ManipulationLogic ManipulationLogic { get; private set; }
     35    public SearchLogic SearchLogic { get; private set; }
     36    public FilterLogic FilterLogic { get; private set; }
     37
     38    public ManipulationContent(ManipulationLogic manipulationLogic, SearchLogic searchLogic, FilterLogic filterLogic) {
     39      ManipulationLogic = manipulationLogic;
     40      SearchLogic = searchLogic;
     41      FilterLogic = filterLogic;
    4742    }
    4843
     
    5247      return new ManipulationContent(this, cloner);
    5348    }
    54 
    55 
    5649  }
    5750}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/MultiScatterPlotContent.cs

    r14903 r14996  
    2828  [Item("Multi Scatter Plot", "Represents a multi scatter plot.")]
    2929  public class MultiScatterPlotContent : ScatterPlotContent {
     30    public static new Image StaticItemImage {
     31      get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; }
     32    }
    3033
    3134    public MultiScatterPlotContent(IFilteredPreprocessingData preprocessingData)
     
    3740    }
    3841
    39     public static new Image StaticItemImage {
    40       get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; }
    41     }
    42 
    4342    public override IDeepCloneable Clone(Cloner cloner) {
    4443      return new MultiScatterPlotContent(this, cloner);
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs

    r14993 r14996  
    3333  [Item("PreprocessingChart", "Represents a preprocessing chart.")]
    3434  public class PreprocessingChartContent : Item, IViewShortcut {
    35 
    3635    public enum LegendOrder {
    3736      Appearance,
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/ScatterPlotContent.cs

    r14993 r14996  
    105105      return scatterPlot;
    106106    }
    107 
    108107  }
    109108}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/SingleScatterPlotContent.cs

    r14903 r14996  
    2828  [Item("Scatter Plot", "Represents a scatter plot.")]
    2929  public class SingleScatterPlotContent : ScatterPlotContent {
     30    public static new Image StaticItemImage {
     31      get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; }
     32    }
    3033
    3134    public string SelectedXVariable { get; set; }
     
    4346    }
    4447
    45     public static new Image StaticItemImage {
    46       get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; }
    47     }
    48 
    4948    public override IDeepCloneable Clone(Cloner cloner) {
    5049      return new SingleScatterPlotContent(this, cloner);
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/StatisticsContent.cs

    r14545 r14996  
    2727  [Item("Statistics", "Represents the statistics grid.")]
    2828  public class StatisticsContent : Item, IViewShortcut {
     29    public static new Image StaticItemImage {
     30      get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; }
     31    }
     32
    2933    public ITransactionalPreprocessingData PreprocessingData { get; private set; }
     34    public StatisticsLogic StatisticsLogic { get; private set; }
    3035
    31     private readonly StatisticsLogic statisticsLogic;
    32     public StatisticsContent(ITransactionalPreprocessingData preProcessingData, StatisticsLogic theStatisticsLogic) {
     36    public StatisticsContent(ITransactionalPreprocessingData preProcessingData, StatisticsLogic statisticsLogic) {
    3337      PreprocessingData = preProcessingData;
    34       statisticsLogic = theStatisticsLogic;
     38      StatisticsLogic = statisticsLogic;
    3539    }
    3640
    3741    public StatisticsContent(StatisticsContent content, Cloner cloner)
    3842      : base(content, cloner) {
    39 
    40     }
    41 
    42     public StatisticsLogic StatisticsLogic {
    43       get { return statisticsLogic; }
    44     }
    45 
    46     public static new Image StaticItemImage {
    47       get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; }
    4843    }
    4944
     
    5348
    5449    public event DataPreprocessingChangedEventHandler Changed {
    55       add { statisticsLogic.Changed += value; }
    56       remove { statisticsLogic.Changed -= value; }
     50      add { StatisticsLogic.Changed += value; }
     51      remove { StatisticsLogic.Changed -= value; }
    5752    }
    58 
    5953  }
    6054}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/TransformationContent.cs

    r14185 r14996  
    2828  [Item("Transformation", "Represents the transformation grid.")]
    2929  public class TransformationContent : Item, IViewShortcut {
     30    public static new Image StaticItemImage {
     31      get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
     32    }
    3033
    3134    public IPreprocessingData Data { get; private set; }
     
    3336
    3437    public ICheckedItemList<ITransformation> CheckedTransformationList { get; private set; }
    35 
    36     public static new Image StaticItemImage {
    37       get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; }
    38     }
    3938
    4039    public TransformationContent(IPreprocessingData data, FilterLogic filterLogic) {
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs

    r14381 r14996  
    271271
    272272    #region IPreprocessingData Members
    273 
    274273    public bool Validate(string value, out string errorMessage, int columnIndex) {
    275274      return originalData.Validate(value, out errorMessage, columnIndex);
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Data/IPreprocessingData.cs

    r14381 r14996  
    2727
    2828namespace HeuristicLab.DataPreprocessing {
    29 
    3029  public interface IPreprocessingData : INamedItem {
    3130    T GetCell<T>(int columnIndex, int rowIndex);
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Data/ITransactionalPreprocessingData.cs

    r14185 r14996  
    2424namespace HeuristicLab.DataPreprocessing {
    2525  public interface ITransactionalPreprocessingData : IPreprocessingData {
    26 
    2726    event DataPreprocessingChangedEventHandler Changed;
    2827
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs

    r14381 r14996  
    3333  [Item("PreprocessingData", "Represents data used for preprocessing.")]
    3434  public abstract class PreprocessingData : NamedItem, IPreprocessingData {
    35 
    3635    public IntRange TrainingPartition { get; set; }
    3736    public IntRange TestPartition { get; set; }
    3837
    39     protected IList<ITransformation> transformations;
    40     public IList<ITransformation> Transformations {
    41       get { return transformations; }
    42     }
     38    public IList<ITransformation> Transformations { get; protected set; }
    4339
    4440    protected IList<IList> variableValues;
     
    8581      TrainingPartition = (IntRange)original.TrainingPartition.Clone(cloner);
    8682      TestPartition = (IntRange)original.TestPartition.Clone(cloner);
    87       transformations = new List<ITransformation>(original.transformations.Select(cloner.Clone));
     83      Transformations = new List<ITransformation>(original.Transformations.Select(cloner.Clone));
    8884
    8985      InputVariables = new List<string>(original.InputVariables);
     
    9793      Name = "Preprocessing Data";
    9894
    99       transformations = new List<ITransformation>();
     95      Transformations = new List<ITransformation>();
    10096      selection = new Dictionary<int, IList<int>>();
    10197
     
    166162
    167163    #region IPreprocessingData Members
    168 
    169164    public abstract T GetCell<T>(int columnIndex, int rowIndex);
    170165
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Data/TransactionalPreprocessingData.cs

    r14185 r14996  
    3333  [Item("PreprocessingData", "Represents data used for preprocessing.")]
    3434  public class TransactionalPreprocessingData : PreprocessingData, ITransactionalPreprocessingData {
    35 
    3635    private class Snapshot {
    3736      public IList<IList> VariableValues { get; set; }
     
    7069        TrainingPartition = new IntRange(TrainingPartition.Start, TrainingPartition.End),
    7170        TestPartition = new IntRange(TestPartition.Start, TestPartition.End),
    72         Transformations = new List<ITransformation>(transformations),
     71        Transformations = new List<ITransformation>(Transformations),
    7372        ChangedType = changedType,
    7473        ChangedColumn = column,
     
    8382
    8483    #region NamedItem abstract Member Implementations
    85 
    8684    public override IDeepCloneable Clone(Cloner cloner) {
    8785      return new TransactionalPreprocessingData(this, cloner);
    8886    }
    89 
    9087    #endregion
    9188
    9289    #region Overridden IPreprocessingData Members
    93 
    9490    public override T GetCell<T>(int columnIndex, int rowIndex) {
    9591      return (T)variableValues[columnIndex][rowIndex];
     
    216212    }
    217213
    218 
    219214    public override void InsertRow(int rowIndex) {
    220215      SaveSnapshot(DataPreprocessingChangedEventType.DeleteRow, -1, rowIndex);
     
    346341
    347342    #region TransactionalPreprocessingData members
    348 
    349343    public bool IsUndoAvailable {
    350344      get { return undoHistory.Count > 0; }
     
    358352        TrainingPartition = previousSnapshot.TrainingPartition;
    359353        TestPartition = previousSnapshot.TestPartition;
    360         transformations = previousSnapshot.Transformations;
     354        Transformations = previousSnapshot.Transformations;
    361355        undoHistory.Remove(previousSnapshot);
    362356        OnChanged(previousSnapshot.ChangedType,
     
    384378      OnChanged(@event, -1, -1);
    385379    }
    386 
    387380    #endregion
    388381  }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Logic/Filter/ComparisonFilter.cs

    r14185 r14996  
    3030  [Item("ComparisonFilter", "A filter which compares the member of the preprocessing data with the constraint data.")]
    3131  public class ComparisonFilter : ComparisonConstraint, IFilter {
    32 
    3332    public override string ItemName {
    3433      get { return "ComparisonFilter"; }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Logic/FilterLogic.cs

    r14185 r14996  
    2727namespace HeuristicLab.DataPreprocessing {
    2828  public class FilterLogic {
    29 
    3029    public IFilteredPreprocessingData PreprocessingData { get; private set; }
    3130
    3231    public bool IsFiltered {
    33       get {
    34         return PreprocessingData.IsFiltered;
    35       }
     32      get { return PreprocessingData.IsFiltered; }
    3633    }
    3734
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Logic/ManipulationLogic.cs

    r14185 r14996  
    3939    }
    4040
    41     public ManipulationLogic(ITransactionalPreprocessingData _prepocessingData, SearchLogic theSearchLogic, StatisticsLogic theStatisticsLogic) {
    42       preprocessingData = _prepocessingData;
     41    public ManipulationLogic(ITransactionalPreprocessingData preprocessingData, SearchLogic theSearchLogic, StatisticsLogic theStatisticsLogic) {
     42      this.preprocessingData = preprocessingData;
    4343      searchLogic = theSearchLogic;
    4444      statisticsLogic = theStatisticsLogic;
     
    108108      preprocessingData.InTransaction(() => {
    109109        foreach (var column in cells) {
    110           int countValues = 0;
    111           if (preprocessingData.VariableHasType<double>(column.Key)) {
    112             countValues = preprocessingData.GetValues<double>(column.Key).Count();
    113           } else if (preprocessingData.VariableHasType<DateTime>(column.Key)) {
    114             countValues = preprocessingData.GetValues<DateTime>(column.Key).Count();
    115           }
    116 
    117110          IList<Tuple<int, int>> startEndings = GetStartAndEndingsForInterpolation(column);
    118111          foreach (var tuple in startEndings) {
     
    266259        for (int i = 0; i < preprocessingData.Columns; ++i) {
    267260          if (preprocessingData.VariableHasType<double>(i)) {
    268             reOrderToIndices<double>(i, indices);
     261            ReOrderToIndices<double>(i, indices);
    269262          } else if (preprocessingData.VariableHasType<string>(i)) {
    270             reOrderToIndices<string>(i, indices);
     263            ReOrderToIndices<string>(i, indices);
    271264          } else if (preprocessingData.VariableHasType<DateTime>(i)) {
    272             reOrderToIndices<DateTime>(i, indices);
     265            ReOrderToIndices<DateTime>(i, indices);
    273266          }
    274267        }
     
    290283    }
    291284
    292     private void reOrderToIndices<T>(int columnIndex, IList<Tuple<int, int>> indices) {
    293 
     285    private void ReOrderToIndices<T>(int columnIndex, IList<Tuple<int, int>> indices) {
    294286      List<T> originalData = new List<T>(preprocessingData.GetValues<T>(columnIndex));
    295287
     
    330322
    331323    public List<int> RowsWithMissingValuesGreater(double percent) {
    332 
    333324      List<int> rows = new List<int>();
    334325
     
    344335
    345336    public List<int> ColumnsWithMissingValuesGreater(double percent) {
    346 
    347337      List<int> columns = new List<int>();
    348338      for (int i = 0; i < preprocessingData.Columns; ++i) {
     
    357347
    358348    public List<int> ColumnsWithVarianceSmaller(double variance) {
    359 
    360349      List<int> columns = new List<int>();
    361350      for (int i = 0; i < preprocessingData.Columns; ++i) {
     
    401390      });
    402391    }
    403 
    404392  }
    405393}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Logic/StatisticsLogic.cs

    r14185 r14996  
    2727namespace HeuristicLab.DataPreprocessing {
    2828  public class StatisticsLogic {
    29 
    3029    private readonly ITransactionalPreprocessingData preprocessingData;
    3130    private readonly SearchLogic searchLogic;
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/PreprocessingContext.cs

    r14332 r14996  
    3232  [StorableClass]
    3333  public class PreprocessingContext : NamedItem, IStorableContent {
    34 
    3534    public string Filename { get; set; }
    3635
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs

    r14185 r14996  
    2828namespace HeuristicLab.DataPreprocessing {
    2929  public class ProblemDataCreator {
    30 
    3130    private readonly PreprocessingContext context;
    3231
    3332    private Dataset ExportedDataset {
    34       get {
    35         return context.Data.ExportToDataset();
    36       }
     33      get { return context.Data.ExportToDataset(); }
    3734    }
    3835
    39     private IList<ITransformation> Transformations { get { return context.Data.Transformations; } }
     36    private IList<ITransformation> Transformations {
     37      get { return context.Data.Transformations; }
     38    }
    4039
    4140    public ProblemDataCreator(PreprocessingContext context) {
Note: See TracChangeset for help on using the changeset viewer.