Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/07/15 16:47:17 (9 years ago)
Author:
pfleck
Message:

#2486

  • Added buttons for adding columns and rows.
  • Fixed a bug with row names.
Location:
trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/DataGridContent.cs

    r12983 r12986  
    4141    public IFilterLogic FilterLogic { get; private set; }
    4242
    43     private IEnumerable<string> rowNames;
    44 
    4543    public int Rows {
    4644      get {
     
    7270    public IEnumerable<string> RowNames {
    7371      get {
    74         return rowNames;
     72        return Enumerable.Range(1, Rows).Select(n => n.ToString());
    7573      }
    7674      set {
     
    103101      FilterLogic = theFilterLogic;
    104102      PreProcessingData = preProcessingData;
    105       createRowNames();
    106103    }
    107104
     
    116113    public void DeleteRows(IEnumerable<int> rows) {
    117114      PreProcessingData.DeleteRowsWithIndices(rows);
    118       createRowNames();
    119115    }
    120116
     
    133129    public bool SetValue(string value, int rowIndex, int columnIndex) {
    134130      return PreProcessingData.SetValue(value, columnIndex, rowIndex);
    135     }
    136 
    137     private void createRowNames() {
    138       rowNames = Enumerable.Range(1, Rows).Select(n => n.ToString());
    139131    }
    140132
  • trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/TransactionalPreprocessingData.cs

    r12983 r12986  
    225225      if (!IsInTransaction)
    226226        OnChanged(DataPreprocessingChangedEventType.DeleteRow, -1, -1);
     227      ResetPartitions();
    227228    }
    228229
     
    235236      if (!IsInTransaction)
    236237        OnChanged(DataPreprocessingChangedEventType.AddRow, -1, rowIndex);
     238      ResetPartitions();
    237239    }
    238240
     
    244246      if (!IsInTransaction)
    245247        OnChanged(DataPreprocessingChangedEventType.DeleteRow, -1, rowIndex);
     248      ResetPartitions();
    246249    }
    247250
     
    284287    }
    285288
     289
     290    private void ResetPartitions() {
     291      TrainingPartition = new IntRange();
     292      TestPartition = new IntRange();
     293    }
    286294
    287295    #endregion
Note: See TracChangeset for help on using the changeset viewer.