Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10187


Ignore:
Timestamp:
12/04/13 14:11:12 (11 years ago)
Author:
tsteinre
Message:

Implemented parts of PreprocessingData.

File:
1 edited

Legend:

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

    r10186 r10187  
    2626using HeuristicLab.Common;
    2727using HeuristicLab.Core;
    28 using HeuristicLab.DataPreprocessing;
    2928using HeuristicLab.Problems.DataAnalysis;
    3029
     
    4645      variableNameIndices = new Dictionary<string, int>(variableNameIndices);
    4746    }
    48    
     47
    4948    public PreprocessingData(IDataAnalysisProblemData problemData)
    5049      : base() {
    5150      Name = "-";
    5251
    53       variableNames = new List<string>(problemData.Dataset.VariableNames));
     52      variableNames = new List<string>(problemData.Dataset.VariableNames);
    5453      // create dictionary from variable name to index
    5554      variableNameIndices = new Dictionary<string, int>();
     
    5857        variableNameIndices.Add(variableNamesList[i], i);
    5958      }
    60      
     59
    6160      // copy values
    6261      variableValues = new Dictionary<string, IList>();
     
    101100
    102101    public void SetCell<T>(int columnIndex, int rowIndex, T value) {
    103       throw new NotImplementedException();
     102      variableValues[variableNames[columnIndex]][rowIndex] = value;
    104103    }
    105104
    106105    public T GetCell<T>(string variableName, int row) {
    107       throw new NotImplementedException();
     106      return (T)variableValues[variableName][row];
    108107    }
    109108
    110109    public void SetCell<T>(string variableName, int row, T value) {
    111       throw new NotImplementedException();
     110      variableValues[variableName][row] = value;
    112111    }
    113112
    114113    public IEnumerable<T> GetValues<T>(int columnIndex) {
    115       throw new NotImplementedException();
     114      return (IEnumerable<T>)variableValues[variableNames[columnIndex]];
    116115    }
    117116
    118117    public IEnumerable<T> GetValues<T>(string variableName) {
    119       throw new NotImplementedException();
     118      return (IEnumerable<T>)variableValues[variableName];
    120119    }
    121120
    122121    public void SetValues<T>(int columnIndex, IEnumerable<T> values) {
    123       throw new NotImplementedException();
     122      variableValues[variableNames[columnIndex]] = values.ToList();
    124123    }
    125124
    126125    public void SetValues<T>(string variableName, IEnumerable<T> values) {
    127       throw new NotImplementedException();
     126      variableValues[variableName] = values.ToList();
    128127    }
    129128
Note: See TracChangeset for help on using the changeset viewer.