- Timestamp:
- 12/07/16 13:50:21 (8 years ago)
- Location:
- branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/HistogramContent.cs
r14185 r14459 35 35 private const int MAX_DISTINCT_VALUES_FOR_CLASSIFCATION = 20; 36 36 37 p rivate int classifierVariableIndex = 0;37 public int ClassifierVariableIndex { get; set; } 38 38 39 public int ClassifierVariableIndex { 40 get { return this.classifierVariableIndex; } 41 set { this.classifierVariableIndex = value; } 42 } 43 public bool IsDetailedChartViewEnabled { get; set; } 44 39 public int Bins { get; set; } 40 public bool ExactBins { get; set; } 45 41 46 42 public HistogramContent(IFilteredPreprocessingData preprocessingData) 47 43 : base(preprocessingData) { 48 AllInOneMode = false; 44 Bins = 10; 45 ExactBins = false; 49 46 } 50 47 … … 70 67 return doubleVariableNames; 71 68 } 72 73 69 } 74 70 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/LineChartContent.cs
r14185 r14459 29 29 public class LineChartContent : PreprocessingChartContent { 30 30 31 private bool allInOneMode = true; 32 public bool AllInOneMode { 33 get { return this.allInOneMode; } 34 set { this.allInOneMode = value; } 35 } 36 31 37 public static new Image StaticItemImage { 32 38 get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; } … … 39 45 public LineChartContent(LineChartContent content, Cloner cloner) 40 46 : base(content, cloner) { 47 this.allInOneMode = content.allInOneMode; 41 48 } 42 49 public override IDeepCloneable Clone(Cloner cloner) { -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs
r14418 r14459 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using System.Drawing; … … 33 32 public static new Image StaticItemImage { 34 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.PieChart; } 35 }36 37 private bool allInOneMode = true;38 public bool AllInOneMode {39 get { return this.allInOneMode; }40 set { this.allInOneMode = value; }41 34 } 42 35 … … 55 48 public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner) 56 49 : base(content, cloner) { 57 this.allInOneMode = content.allInOneMode;58 50 this.PreprocessingData = content.PreprocessingData; 59 51 this.variableItemList = cloner.Clone<ICheckedItemList<StringValue>>(variableItemList); … … 62 54 return new PreprocessingChartContent(this, cloner); 63 55 } 64 65 56 66 57 public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) { … … 71 62 } 72 63 73 public List<DataRow> CreateAllDataRows(DataRowVisualProperties.DataRowChartType chartType) {74 List<DataRow> dataRows = new List<DataRow>();75 foreach (var name in PreprocessingData.GetDoubleVariableNames())76 dataRows.Add(CreateDataRow(name, chartType));77 return dataRows;78 }79 64 80 public DataRow CreateSelectedDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {81 82 IDictionary<int, IList<int>> selection = PreprocessingData.Selection;83 int variableIndex = PreprocessingData.GetColumnIndex(variableName);84 85 if (selection.Keys.Contains(variableIndex)) {86 List<int> selectedIndices = new List<int>(selection[variableIndex]);87 //need selection with more than 1 value88 if (selectedIndices.Count < 2)89 return null;90 91 selectedIndices.Sort();92 int start = selectedIndices[0];93 int end = selectedIndices[selectedIndices.Count - 1];94 95 DataRow rowSelect = CreateDataRowRange(variableName, start, end, chartType);96 return rowSelect;97 } else98 return null;99 }100 101 public DataRow CreateDataRowRange(string variableName, int start, int end, DataRowVisualProperties.DataRowChartType chartType) {102 IList<double> values = PreprocessingData.GetValues<double>(PreprocessingData.GetColumnIndex(variableName));103 IList<double> valuesRange = new List<double>();104 for (int i = 0; i < values.Count; i++) {105 if (i >= start && i <= end)106 valuesRange.Add(values[i]);107 else108 valuesRange.Add(Double.NaN);109 }110 111 DataRow row = new DataRow(variableName, "", valuesRange);112 row.VisualProperties.ChartType = chartType;113 return row;114 }115 116 public List<DataRow> CreateAllSelectedDataRows(DataRowVisualProperties.DataRowChartType chartType) {117 List<DataRow> dataRows = new List<DataRow>();118 foreach (var name in PreprocessingData.GetDoubleVariableNames()) {119 DataRow row = CreateSelectedDataRow(name, chartType);120 if (row != null)121 dataRows.Add(row);122 }123 return dataRows;124 }125 65 126 66 -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj
r14445 r14459 126 126 <Compile Include="Content\PreprocessingChartContent.cs" /> 127 127 <Compile Include="Data\PreprocessingData.cs" /> 128 <Compile Include="Content\PreprocessingDataTable.cs" />129 128 <Compile Include="Content\IViewChartShortcut.cs" /> 130 129 <Compile Include="Data\IFilteredPreprocessingData.cs" />
Note: See TracChangeset
for help on using the changeset viewer.