Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/09/17 11:51:37 (7 years ago)
Author:
pfleck
Message:

#2809: Simplified the overall filtering logic as suggested by bburlacu

  • changed parameter names to actively reflect that filter means "remaining"
  • moved filter combination logic to FilterContent
  • simplified/restructured code
Location:
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs

    r15431 r15466  
    4343
    4444    #region Constructor, Cloning & Persistence
    45     public FilteredPreprocessingData(IPreprocessingData preporcessingData)
     45    public FilteredPreprocessingData(IPreprocessingData preprocessingData)
    4646      : base() {
    47       originalData = preporcessingData;
     47      originalData = preprocessingData;
    4848      filteredData = null;
    4949    }
     
    317317
    318318    #region Filters
    319     public void SetFilter(bool[] rowFilters) {
     319    public void SetFilter(bool[] remainingRows) {
    320320      filteredData = (IPreprocessingData)originalData.Clone();
    321321      filteredData.InTransaction(() => {
    322         for (int row = (rowFilters.Length - 1); row >= 0; --row) {
    323           if (rowFilters[row]) {
     322        for (int row = (remainingRows.Length - 1); row >= 0; --row) {
     323          if (!remainingRows[row]) {
    324324            filteredData.DeleteRow(row);
    325325          }
  • branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/IFilteredPreprocessingData.cs

    r15270 r15466  
    2525  public interface IFilteredPreprocessingData : IPreprocessingData {
    2626    #region Filters
    27     void SetFilter(bool[] rowFilters);
     27    void SetFilter(bool[] remainingRows);
    2828    void PersistFilter();
    2929    void ResetFilter();
Note: See TracChangeset for help on using the changeset viewer.