Changeset 15489 for branches/DataPreprocessing Cleanup
- Timestamp:
- 11/30/17 10:31:27 (7 years ago)
- Location:
- branches/DataPreprocessing Cleanup
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs
r15466 r15489 71 71 applyFilterButton.Enabled = activeFilters; 72 72 73 Content.PreprocessingData.ResetFilter(); 74 73 75 int numTotal = Content.PreprocessingData.Rows; 74 76 int numRemaining = numTotal; 75 77 76 Content.PreprocessingData.ResetFilter();77 78 if (activeFilters) { 78 79 var remainingRows = Content.GetRemainingRows(); 79 Content.PreprocessingData.SetFilter(remainingRows);80 80 numRemaining = remainingRows.Count(x => x); 81 82 if (numRemaining < numTotal) { 83 Content.PreprocessingData.SetFilter(remainingRows); 84 } 81 85 } 82 86 -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs
r15431 r15489 82 82 83 83 public static DataRow CreateDataRow(IFilteredPreprocessingData preprocessingData, string variableName, DataRowVisualProperties.DataRowChartType chartType) { 84 IList<double> values = preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableName)); 85 DataRow row = new DataRow(variableName, "", values); 86 row.VisualProperties.ChartType = chartType; 84 var values = preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableName)); 85 var row = new DataRow(variableName, "", values) { 86 VisualProperties = { 87 ChartType = chartType, 88 StartIndexZero = true 89 } 90 }; 87 91 return row; 88 92 } -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs
r15466 r15489 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; … … 320 321 filteredData = (IPreprocessingData)originalData.Clone(); 321 322 filteredData.InTransaction(() => { 322 for (int row = (remainingRows.Length - 1); row >= 0; --row) { 323 if (!remainingRows[row]) { 324 filteredData.DeleteRow(row); 323 var remainingIndices = Enumerable.Range(0, remainingRows.Length).Where(x => remainingRows[x]); 324 325 foreach (var v in filteredData.VariableNames) { 326 var ci = filteredData.GetColumnIndex(v); 327 if (filteredData.VariableHasType<double>(ci)) { 328 var values = filteredData.GetValues<double>(ci); 329 var filteredValues = remainingIndices.Select(x => values[x]).ToList(); 330 filteredData.SetValues(ci, filteredValues); 331 } else if (filteredData.VariableHasType<DateTime>(ci)) { 332 var values = filteredData.GetValues<DateTime>(ci); 333 var filteredValues = remainingIndices.Select(x => values[x]).ToList(); 334 filteredData.SetValues(ci, filteredValues); 335 } else if (filteredData.VariableHasType<string>(ci)) { 336 var values = filteredData.GetValues<string>(ci); 337 var filteredValues = remainingIndices.Select(x => values[x]).ToList(); 338 filteredData.SetValues(ci, filteredValues); 325 339 } 326 340 }
Note: See TracChangeset
for help on using the changeset viewer.