Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/26/14 12:25:13 (11 years ago)
Author:
rstoll
Message:

Improved performance for RowUpdateHeaders()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/DataGridLogic.cs

    r10634 r10660  
    2525using System.Linq;
    2626using HeuristicLab.Data;
     27using HeuristicLab.DataPreprocessing.Implementations;
    2728
    2829namespace HeuristicLab.DataPreprocessing {
     
    3031
    3132    private ITransactionalPreprocessingData preprocessingData;
     33    private IEnumerable<string> rowNames;
    3234
    3335    public DataGridLogic(ITransactionalPreprocessingData preprocessingData) {
    3436      this.preprocessingData = preprocessingData;
     37      createRowNames();
     38    }
     39
     40    private void createRowNames() {
     41      rowNames = Enumerable.Range(1, Rows).Select(n => n.ToString());
    3542    }
    3643
     
    5562    public IEnumerable<string> RowNames {
    5663      get {
    57         return Enumerable.Range(1, Rows).Select(n => n.ToString());
     64        return rowNames;
    5865      }
    5966    }
     
    126133        }
    127134      });
     135      createRowNames();
    128136    }
    129137
Note: See TracChangeset for help on using the changeset viewer.