Changeset 10672 for branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ManipulationLogic.cs
- Timestamp:
- 03/26/14 16:11:08 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ManipulationLogic.cs
r10621 r10672 30 30 private IStatisticsLogic statisticsLogic; 31 31 private ISearchLogic searchLogic; 32 33 public ManipulationLogic(ITransactionalPreprocessingData _prepocessingData, ISearchLogic theSearchLogic, IStatisticsLogic theStatisticsLogic) { 32 private IDataGridLogic dataGridLogic; 33 34 public ManipulationLogic(ITransactionalPreprocessingData _prepocessingData, ISearchLogic theSearchLogic, IStatisticsLogic theStatisticsLogic, IDataGridLogic theDataGridLogic) { 34 35 preprocessingData = _prepocessingData; 35 36 searchLogic = theSearchLogic; 36 37 statisticsLogic = theStatisticsLogic; 38 dataGridLogic = theDataGridLogic; 37 39 } 38 40 … … 43 45 } 44 46 45 public void ReplaceIndicesByAverageValue( Dictionary<int,List<int>> cells) {47 public void ReplaceIndicesByAverageValue(IDictionary<int, IList<int>> cells) { 46 48 preprocessingData.InTransaction(() => { 47 49 foreach (var column in cells) { … … 57 59 } 58 60 59 public void ReplaceIndicesByMedianValue( Dictionary<int,List<int>> cells) {61 public void ReplaceIndicesByMedianValue(IDictionary<int, IList<int>> cells) { 60 62 preprocessingData.InTransaction(() => { 61 63 foreach (var column in cells) { … … 71 73 } 72 74 73 public void ReplaceIndicesByRandomValue( Dictionary<int,List<int>> cells) {75 public void ReplaceIndicesByRandomValue(IDictionary<int, IList<int>> cells) { 74 76 preprocessingData.InTransaction(() => { 75 77 Random r = new Random(); … … 97 99 } 98 100 99 public void ReplaceIndicesByLinearInterpolationOfNeighbours( Dictionary<int,List<int>> cells) {101 public void ReplaceIndicesByLinearInterpolationOfNeighbours(IDictionary<int, IList<int>> cells) { 100 102 preprocessingData.InTransaction(() => { 101 103 foreach (var column in cells) { … … 163 165 } 164 166 165 public void ReplaceIndicesByMostCommonValue( Dictionary<int,List<int>> cells) {167 public void ReplaceIndicesByMostCommonValue(IDictionary<int, IList<int>> cells) { 166 168 preprocessingData.InTransaction(() => { 167 169 foreach (var column in cells) { … … 236 238 } 237 239 } 240 241 public void ReplaceIndicesByValue(IDictionary<int, IList<int>> cells, string value) { 242 preprocessingData.InTransaction(() => { 243 foreach (var column in cells) { 244 foreach (var rowIdx in column.Value) { 245 dataGridLogic.SetValue(value, column.Key, rowIdx); 246 } 247 } 248 }); 249 } 238 250 } 239 251 }
Note: See TracChangeset
for help on using the changeset viewer.