Changeset 15274 for branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs
- Timestamp:
- 07/19/17 14:32:57 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs
r15210 r15274 88 88 private void UpdateData(Dictionary<string, bool> oldVisibility = null) { 89 89 var logic = Content.StatisticsLogic; 90 rowsTextBox.Text = logic.GetRowCount().ToString(); 91 columnsTextBox.Text = logic.GetColumnCount().ToString(); 92 numericColumnsTextBox.Text = logic.GetNumericColumnCount().ToString(); 93 nominalColumnsTextBox5.Text = logic.GetNominalColumnCount().ToString(); 90 var data = Content.PreprocessingData; 91 rowsTextBox.Text = data.Rows.ToString(); 92 columnsTextBox.Text = data.Rows.ToString(); 93 numericColumnsTextBox.Text = GetColumnCount<double>().ToString(); 94 nominalColumnsTextBox5.Text = GetColumnCount<string>().ToString(); 94 95 missingValuesTextBox.Text = logic.GetMissingValueCount().ToString(); 95 totalValuesTextBox.Text = ( logic.GetColumnCount() * logic.GetRowCount()- logic.GetMissingValueCount()).ToString();96 totalValuesTextBox.Text = (data.Rows * data.Rows - logic.GetMissingValueCount()).ToString(); 96 97 97 98 var variableNames = Content.PreprocessingData.VariableNames.ToList(); … … 107 108 }; 108 109 109 for (int i = 0; i < logic.GetColumnCount(); i++) {110 var data= GetStatistics(i);111 for (int j = 0; j < data.Count; j++) {110 for (int i = 0; i < data.Columns; i++) { 111 var statistics = GetStatistics(i); 112 for (int j = 0; j < statistics.Count; j++) { 112 113 if (horizontal) 113 statisticsMatrix[j, i] = data[j];114 statisticsMatrix[j, i] = statistics[j]; 114 115 else 115 statisticsMatrix[i, j] = data[j];116 statisticsMatrix[i, j] = statistics[j]; 116 117 } 117 118 } … … 136 137 stringMatrixView.DataGridView.AutoResizeColumns(); 137 138 stringMatrixView.Parent.ResumeRepaint(true); 139 } 140 141 public int GetColumnCount<T>() { 142 int count = 0; 143 for (int i = 0; i < Content.PreprocessingData.Columns; ++i) { 144 if (Content.PreprocessingData.VariableHasType<T>(i)) { 145 ++count; 146 } 147 } 148 return count; 138 149 } 139 150
Note: See TracChangeset
for help on using the changeset viewer.