Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/18/13 16:23:21 (11 years ago)
Author:
sbreuer
Message:
  • added apply sorting button to datagridcontentview with click handler
  • modified sorting
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations
Files:
2 edited

Legend:

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

    r10246 r10253  
    1111
    1212    private readonly IDataGridLogic dataGridLogic;
    13     public DataGridContent(IDataGridLogic theDataGridLogic) {
     13    private readonly IPreprocessingDataManipulation preprocessingDataManipulation;
     14    public DataGridContent(IDataGridLogic theDataGridLogic, IPreprocessingDataManipulation thePreprocessingDataManipulation) {
    1415      dataGridLogic = theDataGridLogic;
     16      preprocessingDataManipulation = thePreprocessingDataManipulation;
    1517    }
    1618
    1719    public DataGridContent(DataGridContent dataGridContent, Cloner cloner)
    1820      : base(dataGridContent, cloner) {
     21    }
    1922
     23    public IPreprocessingDataManipulation PreprocessingDataManipulation {
     24      get { return preprocessingDataManipulation; }
    2025    }
    2126
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs

    r10249 r10253  
    115115        }
    116116
    117         foreach (string variableName in preprocessingData.VariableNames) {
    118           if (preprocessingData.IsType<double>(variableName)) {
    119             reOrderToIndices<double>(variableName, shuffledIndices);
    120           } else if (preprocessingData.IsType<string>(variableName)) {
    121             reOrderToIndices<string>(variableName, shuffledIndices);
    122           } else if (preprocessingData.IsType<DateTime>(variableName)) {
    123             reOrderToIndices<DateTime>(variableName, shuffledIndices);
    124           }
     117        reOrdertoIndices(shuffledIndices);
     118      }
     119    }
     120
     121    public void reOrdertoIndices(IList<Tuple<int, int>> indices) {
     122      foreach (string variableName in preprocessingData.VariableNames) {
     123        if (preprocessingData.IsType<double>(variableName)) {
     124          reOrderToIndices<double>(variableName, indices);
     125        } else if (preprocessingData.IsType<string>(variableName)) {
     126          reOrderToIndices<string>(variableName, indices);
     127        } else if (preprocessingData.IsType<DateTime>(variableName)) {
     128          reOrderToIndices<DateTime>(variableName, indices);
    125129        }
    126130      }
    127131    }
    128132
    129     public void reOrderToIndices<T>(string variableName, List<Tuple<int, int>> indices) {
     133    private void reOrderToIndices<T>(string variableName, IList<Tuple<int, int>> indices) {
    130134      // process all columns equally
    131135      foreach (Tuple<int, int> index in indices) {
Note: See TracChangeset for help on using the changeset viewer.