Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/05/12 16:39:54 (12 years ago)
Author:
sforsten
Message:

#1867:

  • Delete command for columns and for rows has been added, which have less data than a specified threshold
  • threshold can be set in a view
Location:
branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command

    • Property svn:ignore
      •  

        old new  
        11bin
        22obj
         3*.user
  • branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/MissingValues/DeleteRowsWithMissingValuesCommand.cs

    r7267 r7968  
    2020#endregion
    2121
    22 using System;
    2322using System.Collections.Generic;
    2423using System.Linq;
    25 using System.Text;
    2624using HeuristicLab.DataImporter.Data;
    2725using HeuristicLab.DataImporter.Data.CommandBase;
     
    5048      base.Execute();
    5149      ColumnGroup tempColumnGroup = new ColumnGroup();
    52       Dictionary<int, object> positions = new Dictionary<int, object>();
     50      HashSet<int> positions = new HashSet<int>();
    5351      ColumnBase column;
    5452
     
    5654        column = ColumnGroup.GetColumn(AffectedColumns[col]);
    5755        for (int row = 0; row < ColumnGroup.RowCount; row++) {
    58           if (column.GetValue(row) == null && !positions.ContainsKey(row))
    59             positions[row] = null;
     56          if (column.GetValue(row) == null && !positions.Contains(row))
     57            positions.Add(row);
    6058        }
    6159      }
     
    6765
    6866      for (int i = 0; i < ColumnGroup.RowCount; i++)
    69         if (!positions.ContainsKey(i))
     67        if (!positions.Contains(i))
    7068          tempColumnGroup.AddRow(ColumnGroup.GetRow(i));
    7169
Note: See TracChangeset for help on using the changeset viewer.