Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/18/13 13:21:20 (11 years ago)
Author:
sbreuer
Message:
  • moved missing value functionality to ISearchLogic
  • created IStringConvertibleMatrix implementation and DataGridContentView
Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
Files:
6 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj

    r10221 r10236  
    8484      <DependentUpon>DataPreprocessingView.cs</DependentUpon>
    8585    </Compile>
     86    <Compile Include="Implementations\DataGridContent.cs" />
    8687    <Compile Include="Implementations\PreprocessingContext.cs" />
    8788    <Compile Include="Implementations\PreprocessingData.cs" />
    8889    <Compile Include="Implementations\PreprocessingDataManipulation.cs" />
     90    <Compile Include="Implementations\SearchLogic.cs" />
    8991    <Compile Include="Implementations\StatisticInfo.cs" />
     92    <Compile Include="DataGridContentView.cs">
     93      <SubType>UserControl</SubType>
     94    </Compile>
     95    <Compile Include="DataGridContentView.Designer.cs">
     96      <DependentUpon>DataGridContentView.cs</DependentUpon>
     97    </Compile>
     98    <Compile Include="Interfaces\IDataGridContent.cs" />
    9099    <Compile Include="Interfaces\IPreprocessingContext.cs" />
     100    <Compile Include="Interfaces\ISearchLogic.cs" />
    91101    <Compile Include="Interfaces\IStatisticInfo.cs" />
    92102    <Compile Include="Interfaces\IPreprocessingData.cs" />
     
    122132      <Private>False</Private>
    123133    </ProjectReference>
     134    <ProjectReference Include="..\..\HeuristicLab.Data.Views\3.3\HeuristicLab.Data.Views-3.3.csproj">
     135      <Project>{72104a0b-90e7-42f3-9abe-9bbbadd4b943}</Project>
     136      <Name>HeuristicLab.Data.Views-3.3</Name>
     137    </ProjectReference>
    124138    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    125139      <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project>
     
    149163    </ProjectReference>
    150164  </ItemGroup>
    151   <ItemGroup />
     165  <ItemGroup>
     166    <EmbeddedResource Include="DataPreprocessingView.resx">
     167      <DependentUpon>DataPreprocessingView.cs</DependentUpon>
     168    </EmbeddedResource>
     169  </ItemGroup>
    152170  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    153171  <PropertyGroup>
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs

    r10235 r10236  
    102102    }
    103103
     104    public string GetCellAsString(string variableName, int row) {
     105      return variableValues[variableName][row].ToString();
     106    }
     107
    104108    public IEnumerable<T> GetValues<T>(string variableName) {
    105109      // TODO: test if cast is valid
     
    145149    }
    146150
    147     public IEnumerable<string> VariableNames {
     151    public IList<string> VariableNames {
    148152      get { return variableNames; }
    149153    }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs

    r10234 r10236  
    1414        public PreprocessingDataManipulation(IPreprocessingData _prepocessingData) {
    1515            preprocessingData = _prepocessingData;
    16             statisticInfo = new StatisticInfo(preprocessingData);
     16          //todo
     17            statisticInfo = new StatisticInfo(preprocessingData, new SearchLogic(preprocessingData));
    1718        }
    1819
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticInfo.cs

    r10216 r10236  
    77  public class StatisticInfo : IStatisticInfo {
    88
    9     private IPreprocessingData preprocessingData;
     9    private readonly IPreprocessingData preprocessingData;
     10    private readonly ISearchLogic searchLogic;
    1011
    11     public StatisticInfo(IPreprocessingData thePreprocessingData) {
     12    public StatisticInfo(IPreprocessingData thePreprocessingData, ISearchLogic theSearchLogic) {
    1213      preprocessingData = thePreprocessingData;
     14      searchLogic = theSearchLogic;
    1315    }
    1416
     
    4446
    4547    public int GetMissingValueCount(string variableName) {
    46       return preprocessingData.GetMissingValueIndices(variableName).Count();
     48      return searchLogic.GetMissingValueIndices(variableName).Count();
    4749    }
    4850
     
    103105      int count = 0;
    104106      foreach (var variableName in preprocessingData.VariableNames) {
    105         if (preprocessingData.IsMissingValue(variableName, rowIndex)) {
     107        if (searchLogic.IsMissingValue(variableName, rowIndex)) {
    106108          ++count;
    107109        }
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs

    r10221 r10236  
    3030    T GetCell<T>(string variableName, int row);
    3131    void SetCell<T>(string variableName, int row, T value);
     32    string GetCellAsString(string variableName, int row);
    3233
    3334    IEnumerable<T> GetValues<T>(string variableName);
     
    4344    IntRange TestPartition { get; }
    4445
    45     IEnumerable<string> VariableNames { get; }
     46    IList<string> VariableNames { get; }
    4647    bool IsType<T>(string variableName);
    4748
     
    4950    int Rows { get; }
    5051
    51     /// <summary>
    52     /// Return the indices of the missing values where the key
    53     /// correspdonds to the variable name and the values to the row indices
    54     /// </summary>
    55     /// <returns></returns>
    56     IDictionary<string, IEnumerable<int>> GetMissingValueIndices();
    57 
    58     /// <summary>
    59     /// Return the row indices of the cells which contain a missing value
    60     /// </summary>
    61     /// <returns></returns>
    62     IEnumerable<int> GetMissingValueIndices(string variableName);
    63 
    64     bool IsMissingValue(string variableName, int rowIndex);
    65 
    6652    Dataset ExportToDataset();
    6753  }
Note: See TracChangeset for help on using the changeset viewer.