Changeset 10844
- Timestamp:
- 05/14/14 11:44:17 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
r10820 r10844 223 223 for (int i = 0; i < Content.FilterLogic.PreprocessingData.Columns; i++) { 224 224 comparisonFilter.ConstraintColumn = i; 225 bool[] filteredRows = Content.FilterLogic.Preview(filters, true); 226 foundCells[i] = filteredRows.Select((value, index) => new { Index = index, Value = value }) 227 .Where(pair => pair.Value) 228 .Select(pair => pair.Index) 229 .ToList(); 225 bool[] filteredRows = Content.FilterLogic.GetFilterResult(filters, true); 226 var foundIndices = new List<int>(); 227 for (int idx = 0; idx < filteredRows.Length; ++idx) { 228 var notFilteredThusFound = !filteredRows[idx]; 229 if (notFilteredThusFound) { 230 foundIndices.Add(idx); 231 } 232 } 233 foundCells[i] = foundIndices; 230 234 IList<int> selectedList; 231 235 if (searchInSelection && HightlightedCellsBackground.TryGetValue(i, out selectedList)) { -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterLogic.cs
r10843 r10844 33 33 } 34 34 35 36 37 public bool[] Preview(IList<IFilter> filters, bool isAndCombination) { 35 public bool[] GetFilterResult(IList<IFilter> filters, bool isAndCombination) { 38 36 IList<IFilter> activeFilters = filters.Where(f => f.Active && f.ConstraintData != null).ToList<IFilter>(); 39 37 … … 50 48 } 51 49 } 50 return result; 51 } 52 52 53 public bool[] Preview(IList<IFilter> filters, bool isAndCombination) { 54 var result = GetFilterResult(filters, isAndCombination); 53 55 preprocessingData.SetFilter(result); 54 55 56 return result; 56 57 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IFilterLogic.cs
r10785 r10844 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using HeuristicLab.DataPreprocessing.Filter; 23 using System.Collections.Generic;24 24 namespace HeuristicLab.DataPreprocessing { 25 25 public interface IFilterLogic { 26 bool[] GetFilterResult(IList<IFilter> filters, bool isAndCombination); 26 27 bool[] Preview(IList<IFilter> filters, bool isAndCombination); 27 28 void Apply(IList<IFilter> filters, bool isAndCombination); 28 IPreprocessingData PreprocessingData {get;}29 IPreprocessingData PreprocessingData { get; } 29 30 void Reset(); 30 31 }
Note: See TracChangeset
for help on using the changeset viewer.