- Timestamp:
- 12/18/13 16:23:21 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations
- Files:
-
- 2 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) {
Note: See TracChangeset
for help on using the changeset viewer.