- Timestamp:
- 12/18/13 16:23:21 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridContent.cs
r10246 r10253 11 11 12 12 private readonly IDataGridLogic dataGridLogic; 13 public DataGridContent(IDataGridLogic theDataGridLogic) { 13 private readonly IPreprocessingDataManipulation preprocessingDataManipulation; 14 public DataGridContent(IDataGridLogic theDataGridLogic, IPreprocessingDataManipulation thePreprocessingDataManipulation) { 14 15 dataGridLogic = theDataGridLogic; 16 preprocessingDataManipulation = thePreprocessingDataManipulation; 15 17 } 16 18 17 19 public DataGridContent(DataGridContent dataGridContent, Cloner cloner) 18 20 : base(dataGridContent, cloner) { 21 } 19 22 23 public IPreprocessingDataManipulation PreprocessingDataManipulation { 24 get { return preprocessingDataManipulation; } 20 25 } 21 26 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs
r10249 r10253 115 115 } 116 116 117 foreach (string variableName in preprocessingData.VariableNames) { 118 if (preprocessingData.IsType<double>(variableName)) { 119 reOrderToIndices<double>(variableName, shuffledIndices); 120 } else if (preprocessingData.IsType<string>(variableName)) { 121 reOrderToIndices<string>(variableName, shuffledIndices); 122 } else if (preprocessingData.IsType<DateTime>(variableName)) { 123 reOrderToIndices<DateTime>(variableName, shuffledIndices); 124 } 117 reOrdertoIndices(shuffledIndices); 118 } 119 } 120 121 public void reOrdertoIndices(IList<Tuple<int, int>> indices) { 122 foreach (string variableName in preprocessingData.VariableNames) { 123 if (preprocessingData.IsType<double>(variableName)) { 124 reOrderToIndices<double>(variableName, indices); 125 } else if (preprocessingData.IsType<string>(variableName)) { 126 reOrderToIndices<string>(variableName, indices); 127 } else if (preprocessingData.IsType<DateTime>(variableName)) { 128 reOrderToIndices<DateTime>(variableName, indices); 125 129 } 126 130 } 127 131 } 128 132 129 p ublic void reOrderToIndices<T>(string variableName,List<Tuple<int, int>> indices) {133 private void reOrderToIndices<T>(string variableName, IList<Tuple<int, int>> indices) { 130 134 // process all columns equally 131 135 foreach (Tuple<int, int> index in indices) { -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IDataGridContent.cs
r10246 r10253 8 8 public interface IDataGridContent : IStringConvertibleMatrix { 9 9 IDataGridLogic DataGridLogic { get; } 10 IPreprocessingDataManipulation PreprocessingDataManipulation { get; } 10 11 } 11 12 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingDataManipulation.cs
r10246 r10253 3 3 namespace HeuristicLab.DataPreprocessing { 4 4 interface IPreprocessingDataManipulation { 5 void reOrderToIndices <T>(string variableName,List<Tuple<int, int>> indices);5 void reOrderToIndices(IList<Tuple<int, int>> indices); 6 6 void ReplaceIndicesByAverageValue(string variableName, IEnumerable<int> indices); 7 7 void ReplaceIndicesByLinearInterpolationOfNeighbours(string variableName, IEnumerable<int> indices); -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataGridContentView.Designer.cs
r10243 r10253 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 this.btnApplySort = new System.Windows.Forms.Button(); 26 27 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 27 28 this.SuspendLayout(); … … 32 33 this.errorProvider.SetIconPadding(this.rowsTextBox, 2); 33 34 this.rowsTextBox.ReadOnly = true; 35 this.rowsTextBox.Size = new System.Drawing.Size(296, 20); 34 36 // 35 37 // columnsTextBox 36 38 // 37 39 this.columnsTextBox.ReadOnly = true; 40 this.columnsTextBox.Size = new System.Drawing.Size(296, 20); 41 // 42 // statisticsTextBox 43 // 44 this.statisticsTextBox.Size = new System.Drawing.Size(522, 13); 45 // 46 // btnApplySort 47 // 48 this.btnApplySort.Location = new System.Drawing.Point(398, 18); 49 this.btnApplySort.Name = "btnApplySort"; 50 this.btnApplySort.Size = new System.Drawing.Size(75, 23); 51 this.btnApplySort.TabIndex = 7; 52 this.btnApplySort.Text = "Apply Sort"; 53 this.btnApplySort.UseVisualStyleBackColor = true; 54 this.btnApplySort.Click += new System.EventHandler(this.btnApplySort_Click); 38 55 // 39 56 // DataGridContentView … … 41 58 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 42 59 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 60 this.Controls.Add(this.btnApplySort); 43 61 this.Name = "DataGridContentView"; 62 this.Size = new System.Drawing.Size(528, 404); 44 63 this.Controls.SetChildIndex(this.statisticsTextBox, 0); 45 64 this.Controls.SetChildIndex(this.rowsLabel, 0); … … 47 66 this.Controls.SetChildIndex(this.rowsTextBox, 0); 48 67 this.Controls.SetChildIndex(this.columnsTextBox, 0); 68 this.Controls.SetChildIndex(this.btnApplySort, 0); 49 69 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 50 70 this.ResumeLayout(false); … … 54 74 55 75 #endregion 76 77 private System.Windows.Forms.Button btnApplySort; 56 78 } 57 79 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataGridContentView.cs
r10246 r10253 23 23 protected override void OnContentChanged() { 24 24 base.OnContentChanged(); 25 } 25 26 26 }27 27 28 28 private void dataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { … … 35 35 } 36 36 } 37 38 private void btnApplySort_Click(object sender, System.EventArgs e) { 39 40 } 37 41 } 38 42 }
Note: See TracChangeset
for help on using the changeset viewer.