Changeset 15309 for branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs
- Timestamp:
- 08/07/17 09:43:58 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs
r15283 r15309 38 38 private IPreprocessingData filteredData; 39 39 40 public IList<PreprocessingDataColumn> DataColumns { 41 get { return ActiveData.DataColumns; } 42 } 43 40 44 public IPreprocessingData ActiveData { 41 45 get { return IsFiltered ? filteredData : originalData; } … … 82 86 } 83 87 84 public I List<T> GetValues<T>(int columnIndex, bool considerSelection) {88 public IEnumerable<T> GetValues<T>(int columnIndex, bool considerSelection) { 85 89 return ActiveData.GetValues<T>(columnIndex, considerSelection); 86 90 } 87 91 88 public void SetValues<T>(int columnIndex, I List<T> values) {92 public void SetValues<T>(int columnIndex, IEnumerable<T> values) { 89 93 if (IsFiltered) 90 94 throw new InvalidOperationException("SetValues not possible while data is filtered"); … … 123 127 } 124 128 125 public void DeleteRows WithIndices(IEnumerable<int> rows) {129 public void DeleteRows(IEnumerable<int> rows) { 126 130 if (IsFiltered) 127 131 throw new InvalidOperationException("DeleteRowsWithIndices not possible while data is filtered"); 128 132 129 originalData.DeleteRows WithIndices(rows);133 originalData.DeleteRows(rows); 130 134 } 131 135 … … 273 277 public void EndTransaction() { 274 278 originalData.EndTransaction(); 275 }276 #endregion277 278 #region Statistics279 public T GetMin<T>(int columnIndex, bool considerSelection = false, T emptyValue = default(T)) {280 return ActiveData.GetMin<T>(columnIndex, considerSelection, emptyValue);281 }282 public T GetMax<T>(int columnIndex, bool considerSelection = false, T emptyValue = default(T)) {283 return ActiveData.GetMax<T>(columnIndex, considerSelection, emptyValue);284 }285 public T GetMean<T>(int columnIndex, bool considerSelection = false, T emptyValue = default(T)) {286 return ActiveData.GetMean<T>(columnIndex, considerSelection, emptyValue);287 }288 public T GetMedian<T>(int columnIndex, bool considerSelection = false, T emptyValue = default(T)) where T : IComparable<T> {289 return ActiveData.GetMean<T>(columnIndex, considerSelection, emptyValue);290 }291 public T GetMode<T>(int columnIndex, bool considerSelection = false, T emptyValue = default(T)) where T : IEquatable<T> {292 return ActiveData.GetMode<T>(columnIndex, considerSelection, emptyValue);293 }294 public T GetStandardDeviation<T>(int columnIndex, bool considerSelection = false, T emptyValue = default(T)) {295 return ActiveData.GetStandardDeviation<T>(columnIndex, considerSelection, emptyValue);296 }297 public T GetVariance<T>(int columnIndex, bool considerSelection = false, T emptyValue = default(T)) {298 return ActiveData.GetVariance<T>(columnIndex, considerSelection, emptyValue);299 }300 public T GetQuantile<T>(double alpha, int columnIndex, bool considerSelection = false, T emptyValue = default(T)) where T : IComparable<T> {301 return ActiveData.GetQuantile<T>(alpha, columnIndex, considerSelection, emptyValue);302 }303 public int GetDistinctValues<T>(int columnIndex, bool considerSelection = false) {304 return ActiveData.GetDistinctValues<T>(columnIndex, considerSelection);305 }306 307 public int GetMissingValueCount() {308 return ActiveData.GetMissingValueCount();309 }310 public int GetMissingValueCount(int columnIndex) {311 return ActiveData.GetMissingValueCount(columnIndex);312 }313 public int GetRowMissingValueCount(int rowIndex) {314 return ActiveData.GetRowMissingValueCount(rowIndex);315 279 } 316 280 #endregion
Note: See TracChangeset
for help on using the changeset viewer.