Changeset 10802
- Timestamp:
- 05/07/14 10:27:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterLogic.cs
r10785 r10802 43 43 } 44 44 45 bool[] result = Enumerable.Repeat<bool>(true, preprocessingData.Rows).ToArray(); 45 bool[] result = TrueBoolArray(preprocessingData.Rows); 46 46 47 foreach (IFilter filter in activeFilters) 47 48 { … … 49 50 for (int row = 0; row < result.Length; ++row) 50 51 { 51 result[row] = isAndCombination ? result[row] && filterResult[row] : result[row] || filterResult[row];52 result[row] = Result(result[row], filterResult[row], isAndCombination); 52 53 } 53 54 } 54 55 55 56 56 preprocessingData.SetFilter(result); 57 57 58 58 return result; 59 } 60 61 public bool[] TrueBoolArray(int rows) { 62 return Enumerable.Repeat<bool>(true, rows).ToArray(); 63 } 64 65 public bool Result(bool current, bool addition, bool isAndCombination) { 66 return isAndCombination ? current && addition : current || addition; 59 67 } 60 68
Note: See TracChangeset
for help on using the changeset viewer.