Changeset 10783
- Timestamp:
- 04/23/14 15:27:20 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
r10770 r10783 72 72 </ItemGroup> 73 73 <ItemGroup> 74 <Compile Include="Implementations\FilteredPreprocessingData.cs" /> 74 75 <Compile Include="Implementations\ManipulationContent.cs" /> 75 76 <Compile Include="Implementations\PreprocessingChartContent.cs" /> 76 77 <Compile Include="Implementations\PreprocessingData.cs" /> 77 78 <Compile Include="Implementations\DataGridLogic.cs" /> 79 <Compile Include="Interfaces\IFilteredPreprocessingData.cs" /> 78 80 <Compile Include="Utils\DataPreprocessingChangedEvent.cs" /> 79 81 <Compile Include="Implementations\Filter\ComparisonFilter.cs" /> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilterLogic.cs
r10703 r10783 24 24 using System; 25 25 using System.Linq; 26 using HeuristicLab.DataPreprocessing.Interfaces; 26 27 namespace HeuristicLab.DataPreprocessing { 27 28 public class FilterLogic : IFilterLogic { 28 29 29 private I TransactionalPreprocessingData preprocessingData;30 private IFilteredPreprocessingData preprocessingData; 30 31 31 public FilterLogic(ITransactionalPreprocessingData preprocessingData) { 32 public FilterLogic(IFilteredPreprocessingData preprocessingData) 33 { 32 34 this.preprocessingData = preprocessingData; 33 35 } … … 52 54 } 53 55 56 preprocessingData.SetFilter(result); 57 54 58 return result; 55 59 } … … 57 61 public void Apply(IList<IFilter> filters) 58 62 { 59 bool[] results = Preview(filters); 63 preprocessingData.SetFilter(Preview(filters)); 64 preprocessingData.PersistFilter(); 65 } 60 66 61 preprocessingData.InTransaction(() => 62 { 63 for (int row = (results.Length - 1); row >= 0; --row) 64 { 65 if (results[row]) 66 { 67 preprocessingData.DeleteRow(row); 68 } 69 } 70 }); 71 } 72 67 public void Reset() { 68 preprocessingData.ResetFilter(); 69 } 73 70 74 71 public IPreprocessingData PreprocessingData -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingContext.cs
r10695 r10783 28 28 using HeuristicLab.Problems.DataAnalysis.Symbolic; 29 29 using Variable = HeuristicLab.Problems.DataAnalysis.Symbolic.Variable; 30 using HeuristicLab.DataPreprocessing.Implementations; 31 using HeuristicLab.DataPreprocessing.Interfaces; 30 32 31 33 namespace HeuristicLab.DataPreprocessing { … … 34 36 : Item, IPreprocessingContext { 35 37 36 public I TransactionalPreprocessingData Data { get; private set; }38 public IFilteredPreprocessingData Data { get; private set; } 37 39 38 40 public IDataAnalysisProblemData DataAnalysisProblemData { get; private set; } … … 43 45 44 46 public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, IDataAnalysisProblem problem) { 45 Data = new TransactionalPreprocessingData(dataAnalysisProblemData); 47 48 TransactionalPreprocessingData transactionalPreprocessingData = new TransactionalPreprocessingData(dataAnalysisProblemData); 49 50 Data = new FilteredPreprocessingData(transactionalPreprocessingData); 46 51 DataAnalysisProblemData = dataAnalysisProblemData; 47 52 Algorithm = algorithm; -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs
r10772 r10783 84 84 85 85 protected IList<IList> CopyVariableValues(IList<IList> original) { 86 var copy = new List<IList>( variableValues);86 var copy = new List<IList>(original); 87 87 for (int i = 0; i < original.Count; ++i) { 88 variableValues[i] = (IList)Activator.CreateInstance(original[i].GetType(), original[i]);88 copy[i] = (IList)Activator.CreateInstance(original[i].GetType(), original[i]); 89 89 } 90 90 return copy; -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingContext.cs
r10676 r10783 24 24 using HeuristicLab.Optimization; 25 25 using HeuristicLab.Problems.DataAnalysis; 26 using HeuristicLab.DataPreprocessing.Interfaces; 26 27 27 28 namespace HeuristicLab.DataPreprocessing { … … 29 30 : IItem { 30 31 31 I TransactionalPreprocessingData Data { get; }32 IFilteredPreprocessingData Data { get; } 32 33 33 34 [Obsolete]
Note: See TracChangeset
for help on using the changeset viewer.