Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/14 12:47:54 (10 years ago)
Author:
sbreuer
Message:
  • selected average and co. implemented
  • SelectionChanged NullPointer fixed
File:
1 edited

Legend:

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

    r10804 r10809  
    122122
    123123    [Obsolete("use the index based variant, is faster")]
    124     public IList<T> GetValues<T>(string variableName) {
    125       return GetValues<T>(GetColumnIndex(variableName));
    126     }
    127 
    128     public IList<T> GetValues<T>(int columnIndex) {
    129       return (IList<T>)variableValues[columnIndex];
     124    public IList<T> GetValues<T>(string variableName, bool considerSelection) {
     125      return GetValues<T>(GetColumnIndex(variableName), considerSelection);
     126    }
     127
     128    public IList<T> GetValues<T>(int columnIndex, bool considerSelection) {
     129      if (considerSelection) {
     130        var list = new List<T>();
     131        foreach (var rowIdx in currentSelection[columnIndex]) {
     132          list.Add((T)variableValues[columnIndex][rowIdx]);
     133        }
     134        return list;
     135      } else {
     136        return (IList<T>)variableValues[columnIndex];
     137      }
    130138    }
    131139
Note: See TracChangeset for help on using the changeset viewer.