Changeset 10900 for branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs
- Timestamp:
- 05/28/14 12:52:24 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs
r10847 r10900 118 118 } 119 119 } 120 121 OnFilterChanged(); 120 122 } 121 123 122 124 public void PersistFilter() { 123 originalData = (ITransactionalPreprocessingData)filteredData.Clone(); 125 originalData.InTransaction(() => { 126 for (int i = 0; i < filteredData.Columns; ++i) { 127 if (filteredData.IsType<double>(i)) { 128 originalData.SetValues<double>(i, filteredData.GetValues<double>(i)); 129 } else if (filteredData.IsType<string>(i)) { 130 originalData.SetValues<string>(i, filteredData.GetValues<string>(i)); 131 } else if (filteredData.IsType<DateTime>(i)) { 132 originalData.SetValues<DateTime>(i, filteredData.GetValues<DateTime>(i)); 133 } else { 134 throw new ArgumentException("Data types of columns do not match"); 135 } 136 } 137 }); 124 138 ResetFilter(); 125 139 } … … 127 141 public void ResetFilter() { 128 142 filteredData = null; 143 OnFilterChanged(); 144 } 145 146 private void OnFilterChanged() { 147 if (FilterChanged != null) { 148 FilterChanged(this, new EventArgs()); 149 } 129 150 } 130 151 … … 171 192 } 172 193 194 public event EventHandler FilterChanged; 195 173 196 #region IPreprocessingData Members 174 197
Note: See TracChangeset
for help on using the changeset viewer.