Changeset 10803 for branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
- Timestamp:
- 05/07/14 10:44:11 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
r10736 r10803 38 38 public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) { 39 39 IList<double> values = preprocessingData.GetValues<double>(variableName); 40 41 //TODO: handle NAN values correctly42 // CalculateHistogram in DataTableView fails with NAN values ( Min(), Max() returns NAN)43 ReplayNANwithZero(values);44 40 DataRow row = new DataRow(variableName, "", values); 45 41 row.VisualProperties.ChartType = chartType; … … 47 43 } 48 44 49 private void ReplayNANwithZero(IList<double> values) { 45 public DataRow CreateDataRowRange(string variableName,int start, int end, DataRowVisualProperties.DataRowChartType chartType) { 46 IList<double> values = preprocessingData.GetValues<double>(variableName); 47 IList<double> valuesRange = new List<double>(); 48 for (int i = 0; i < values.Count; i++) { 49 if (i >= start && i <= end) 50 valuesRange.Add(values[i]); 51 else 52 valuesRange.Add(Double.NaN); 53 } 54 55 DataRow row = new DataRow(variableName, "", valuesRange); 56 row.VisualProperties.ChartType = chartType; 57 return row; 58 } 59 60 private void ReplaceNANwithZero(IList<double> values) { 50 61 for (int i = 0; i < values.Count; i++) { 51 62 if (Double.IsNaN(values[i]))
Note: See TracChangeset
for help on using the changeset viewer.