- Timestamp:
- 12/18/13 13:21:20 (11 years ago)
- 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 84 84 <DependentUpon>DataPreprocessingView.cs</DependentUpon> 85 85 </Compile> 86 <Compile Include="Implementations\DataGridContent.cs" /> 86 87 <Compile Include="Implementations\PreprocessingContext.cs" /> 87 88 <Compile Include="Implementations\PreprocessingData.cs" /> 88 89 <Compile Include="Implementations\PreprocessingDataManipulation.cs" /> 90 <Compile Include="Implementations\SearchLogic.cs" /> 89 91 <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" /> 90 99 <Compile Include="Interfaces\IPreprocessingContext.cs" /> 100 <Compile Include="Interfaces\ISearchLogic.cs" /> 91 101 <Compile Include="Interfaces\IStatisticInfo.cs" /> 92 102 <Compile Include="Interfaces\IPreprocessingData.cs" /> … … 122 132 <Private>False</Private> 123 133 </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> 124 138 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj"> 125 139 <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project> … … 149 163 </ProjectReference> 150 164 </ItemGroup> 151 <ItemGroup /> 165 <ItemGroup> 166 <EmbeddedResource Include="DataPreprocessingView.resx"> 167 <DependentUpon>DataPreprocessingView.cs</DependentUpon> 168 </EmbeddedResource> 169 </ItemGroup> 152 170 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 153 171 <PropertyGroup> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs
r10235 r10236 102 102 } 103 103 104 public string GetCellAsString(string variableName, int row) { 105 return variableValues[variableName][row].ToString(); 106 } 107 104 108 public IEnumerable<T> GetValues<T>(string variableName) { 105 109 // TODO: test if cast is valid … … 145 149 } 146 150 147 public I Enumerable<string> VariableNames {151 public IList<string> VariableNames { 148 152 get { return variableNames; } 149 153 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs
r10234 r10236 14 14 public PreprocessingDataManipulation(IPreprocessingData _prepocessingData) { 15 15 preprocessingData = _prepocessingData; 16 statisticInfo = new StatisticInfo(preprocessingData); 16 //todo 17 statisticInfo = new StatisticInfo(preprocessingData, new SearchLogic(preprocessingData)); 17 18 } 18 19 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticInfo.cs
r10216 r10236 7 7 public class StatisticInfo : IStatisticInfo { 8 8 9 private IPreprocessingData preprocessingData; 9 private readonly IPreprocessingData preprocessingData; 10 private readonly ISearchLogic searchLogic; 10 11 11 public StatisticInfo(IPreprocessingData thePreprocessingData ) {12 public StatisticInfo(IPreprocessingData thePreprocessingData, ISearchLogic theSearchLogic) { 12 13 preprocessingData = thePreprocessingData; 14 searchLogic = theSearchLogic; 13 15 } 14 16 … … 44 46 45 47 public int GetMissingValueCount(string variableName) { 46 return preprocessingData.GetMissingValueIndices(variableName).Count();48 return searchLogic.GetMissingValueIndices(variableName).Count(); 47 49 } 48 50 … … 103 105 int count = 0; 104 106 foreach (var variableName in preprocessingData.VariableNames) { 105 if ( preprocessingData.IsMissingValue(variableName, rowIndex)) {107 if (searchLogic.IsMissingValue(variableName, rowIndex)) { 106 108 ++count; 107 109 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs
r10221 r10236 30 30 T GetCell<T>(string variableName, int row); 31 31 void SetCell<T>(string variableName, int row, T value); 32 string GetCellAsString(string variableName, int row); 32 33 33 34 IEnumerable<T> GetValues<T>(string variableName); … … 43 44 IntRange TestPartition { get; } 44 45 45 I Enumerable<string> VariableNames { get; }46 IList<string> VariableNames { get; } 46 47 bool IsType<T>(string variableName); 47 48 … … 49 50 int Rows { get; } 50 51 51 /// <summary>52 /// Return the indices of the missing values where the key53 /// correspdonds to the variable name and the values to the row indices54 /// </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 value60 /// </summary>61 /// <returns></returns>62 IEnumerable<int> GetMissingValueIndices(string variableName);63 64 bool IsMissingValue(string variableName, int rowIndex);65 66 52 Dataset ExportToDataset(); 67 53 }
Note: See TracChangeset
for help on using the changeset viewer.