- Timestamp:
- 07/19/17 14:32:57 (7 years ago)
- Location:
- branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4
- Files:
-
- 1 added
- 1 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/CorrelationMatrixContent.cs
r15270 r15274 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 using HeuristicLab.Problems.DataAnalysis; 26 27 27 28 namespace HeuristicLab.DataPreprocessing { 28 29 [Item("Feature Correlation Matrix", "Represents the feature correlation matrix.")] 29 public class CorrelationMatrixContent : Item, IViewShortcut { 30 [StorableClass] 31 public class CorrelationMatrixContent : PreprocessingContent, IViewShortcut { 30 32 public static new Image StaticItemImage { 31 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.Gradient; } 32 34 } 33 35 36 [Storable] 34 37 public PreprocessingContext Context { get; private set; } 35 public IPreprocessingData PreprocessingData { 36 get { return Context.Data; } 37 } 38 38 39 39 40 public DataAnalysisProblemData ProblemData { … … 47 48 } 48 49 49 public CorrelationMatrixContent(PreprocessingContext context) { 50 #region Constructor, Cloning & Persistence 51 public CorrelationMatrixContent(PreprocessingContext context) 52 : base(context.Data) { 50 53 Context = context; 51 54 } … … 55 58 Context = original.Context; 56 59 } 57 58 60 public override IDeepCloneable Clone(Cloner cloner) { 59 61 return new CorrelationMatrixContent(this, cloner); 60 62 } 63 64 [StorableConstructor] 65 protected CorrelationMatrixContent(bool deserializing) 66 : base(deserializing) { } 67 #endregion 61 68 62 69 public event DataPreprocessingChangedEventHandler Changed { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/DataCompletenessChartContent.cs
r15270 r15274 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 26 27 namespace HeuristicLab.DataPreprocessing { 27 28 [Item("Data Completeness Chart", "Represents a datacompleteness chart.")] 28 29 public class DataCompletenessChartContent : Item, IViewShortcut {29 [StorableClass] 30 public class DataCompletenessChartContent : PreprocessingContent, IViewShortcut { 30 31 public static new Image StaticItemImage { 31 32 get { return HeuristicLab.Common.Resources.VSImageLibrary.EditBrightnessContrast; } 32 33 } 33 34 34 public IPreprocessingData PreprocessingData { get; private set; } 35 36 public DataCompletenessChartContent(IPreprocessingData preprocessingData) { 37 PreprocessingData = preprocessingData; 35 #region Constructor, Cloning & Persistence 36 public DataCompletenessChartContent(IFilteredPreprocessingData preprocessingData) 37 : base(preprocessingData) { 38 38 } 39 39 40 40 public DataCompletenessChartContent(DataCompletenessChartContent content, Cloner cloner) 41 41 : base(content, cloner) { 42 PreprocessingData = content.PreprocessingData;43 42 } 44 45 43 public override IDeepCloneable Clone(Cloner cloner) { 46 44 return new DataCompletenessChartContent(this, cloner); 47 45 } 46 47 [StorableConstructor] 48 protected DataCompletenessChartContent(bool deserializing) 49 : base(deserializing) { } 50 #endregion 48 51 } 49 52 } -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/DataGridContent.cs
r15270 r15274 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Data; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 30 30 31 namespace HeuristicLab.DataPreprocessing { 31 32 32 [Item("Data Grid", "Represents a data grid.")] 33 public class DataGridContent : Item, IStringConvertibleMatrix, IViewShortcut { 33 [StorableClass] 34 public class DataGridContent : PreprocessingContent, IStringConvertibleMatrix, IViewShortcut { 34 35 public static new Image StaticItemImage { 35 36 get { return HeuristicLab.Common.Resources.VSImageLibrary.Table; } 36 37 } 37 38 38 public IPreprocessingData PreprocessingData { get; private set; } 39 39 [Storable] 40 40 public ManipulationLogic ManipulationLogic { get; private set; } 41 public FilterLogic FilterLogic { get; private set; }42 41 43 42 public int Rows { … … 75 74 } 76 75 77 public DataGridContent(IPreprocessingData preprocessingData, ManipulationLogic theManipulationLogic, FilterLogic theFilterLogic) {78 ManipulationLogic = theManipulationLogic;79 FilterLogic = theFilterLogic;80 PreprocessingData = preprocessingData;76 #region Constructor, Cloning & Persistence 77 public DataGridContent(IFilteredPreprocessingData preprocessingData, ManipulationLogic manipulationLogic) 78 : base(preprocessingData) { 79 ManipulationLogic = manipulationLogic; 81 80 } 82 81 83 public DataGridContent(DataGridContent dataGridContent, Cloner cloner)84 : base( dataGridContent, cloner) {85 82 public DataGridContent(DataGridContent original, Cloner cloner) 83 : base(original, cloner) { 84 ManipulationLogic = cloner.Clone(original.ManipulationLogic); 86 85 } 87 86 public override IDeepCloneable Clone(Cloner cloner) { 88 87 return new DataGridContent(this, cloner); 89 88 } 89 90 [StorableConstructor] 91 protected DataGridContent(bool deserializing) 92 : base(deserializing) { } 93 #endregion 90 94 91 95 public void DeleteRows(IEnumerable<int> rows) { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/FilterContent.cs
r15110 r15274 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.DataPreprocessing.Filter; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 27 28 namespace HeuristicLab.DataPreprocessing { 28 29 [Item("Filter", "Represents the filter grid.")] 29 public class FilterContent : Item, IViewShortcut { 30 [StorableClass] 31 public class FilterContent : PreprocessingContent, IViewShortcut { 30 32 public static new Image StaticItemImage { 31 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.Filter; } 32 34 } 33 34 public FilterLogic FilterLogic { get; private set; } 35 35 [Storable] 36 36 public ICheckedItemCollection<IFilter> Filters { get; private set; } 37 37 38 [Storable] 38 39 public bool IsAndCombination { get; set; } 39 40 40 public FilterContent(FilterLogic filterLogic) { 41 #region Constructor, Cloning & Persistence 42 public FilterContent(IFilteredPreprocessingData preprocessingData) 43 : base(preprocessingData) { 41 44 Filters = new CheckedItemCollection<IFilter>(); 42 45 IsAndCombination = true; 43 FilterLogic = filterLogic;44 46 } 45 47 46 protected FilterContent(FilterContent content, Cloner cloner) 47 : base(content, cloner) { 48 protected FilterContent(FilterContent original, Cloner cloner) 49 : base(original, cloner) { 50 Filters = cloner.Clone(original.Filters); 51 IsAndCombination = original.IsAndCombination; 48 52 } 49 50 53 public override IDeepCloneable Clone(Cloner cloner) { 51 54 return new FilterContent(this, cloner); 52 55 } 56 57 [StorableConstructor] 58 protected FilterContent(bool deserializing) 59 : base(deserializing) { } 60 #endregion 53 61 } 54 62 } -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/HistogramContent.cs
r15210 r15274 26 26 using HeuristicLab.Common; 27 27 using HeuristicLab.Core; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.DataPreprocessing { 30 31 [Item("Histogram", "Represents the histogram grid.")] 32 [StorableClass] 31 33 public class HistogramContent : PreprocessingChartContent { 32 34 public static new Image StaticItemImage { … … 34 36 } 35 37 38 [Storable] 36 39 public string GroupingVariableName { get; set; } 37 40 41 [Storable] 38 42 public int Bins { get; set; } 43 [Storable] 39 44 public bool ExactBins { get; set; } 40 45 46 [Storable] 41 47 public LegendOrder Order { get; set; } 42 48 49 #region Constructor, Cloning & Persistence 43 50 public HistogramContent(IFilteredPreprocessingData preprocessingData) 44 51 : base(preprocessingData) { … … 47 54 } 48 55 49 public HistogramContent(HistogramContent content, Cloner cloner) 50 : base(content, cloner) { 56 public HistogramContent(HistogramContent original, Cloner cloner) 57 : base(original, cloner) { 58 GroupingVariableName = original.GroupingVariableName; 59 Bins = original.Bins; 60 ExactBins = original.ExactBins; 61 Order = original.Order; 51 62 } 52 63 public override IDeepCloneable Clone(Cloner cloner) { 53 64 return new HistogramContent(this, cloner); 54 65 } 66 67 [StorableConstructor] 68 protected HistogramContent(bool deserializing) 69 : base(deserializing) { } 70 #endregion 55 71 56 72 public static DataTable CreateHistogram(IFilteredPreprocessingData preprocessingData, string variableName, string groupingVariableName, DataTableVisualProperties.DataTableHistogramAggregation aggregation, LegendOrder legendOrder = LegendOrder.Alphabetically) { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/LineChartContent.cs
r15110 r15274 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 26 27 namespace HeuristicLab.DataPreprocessing { 27 28 28 [Item("Line Chart", "Represents the line chart grid.")] 29 [StorableClass] 29 30 public class LineChartContent : PreprocessingChartContent { 30 public bool AllInOneMode { get; set; }31 32 31 public static new Image StaticItemImage { 33 32 get { return HeuristicLab.Common.Resources.VSImageLibrary.Performance; } 34 33 } 35 34 35 [Storable] 36 public bool AllInOneMode { get; set; } 37 38 39 #region Constructor, Cloning & Persistence 36 40 public LineChartContent(IFilteredPreprocessingData preprocessingData) 37 41 : base(preprocessingData) { … … 39 43 } 40 44 41 public LineChartContent(LineChartContent content, Cloner cloner)42 : base( content, cloner) {43 this.AllInOneMode = content.AllInOneMode;45 public LineChartContent(LineChartContent original, Cloner cloner) 46 : base(original, cloner) { 47 AllInOneMode = original.AllInOneMode; 44 48 } 45 49 public override IDeepCloneable Clone(Cloner cloner) { 46 50 return new LineChartContent(this, cloner); 47 51 } 52 53 [StorableConstructor] 54 protected LineChartContent(bool deserializing) 55 : base(deserializing) { } 56 #endregion 48 57 } 49 58 } -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/ManipulationContent.cs
r15269 r15274 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 26 27 namespace HeuristicLab.DataPreprocessing { 27 28 28 [Item("Manipulation", "Represents the available manipulations on a data set.")] 29 public class ManipulationContent : Item, IViewShortcut { 29 [StorableClass] 30 public class ManipulationContent : PreprocessingContent, IViewShortcut { 30 31 public static new Image StaticItemImage { 31 32 get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; } 32 33 } 33 34 35 [Storable] 34 36 public ManipulationLogic ManipulationLogic { get; private set; } 35 public FilterLogic FilterLogic { get; private set; }36 37 37 public ManipulationContent(ManipulationLogic manipulationLogic, FilterLogic filterLogic) { 38 #region Constructor, Cloning & Persistence 39 public ManipulationContent(IFilteredPreprocessingData preprocessingData, ManipulationLogic manipulationLogic) 40 : base(preprocessingData) { 38 41 ManipulationLogic = manipulationLogic; 39 FilterLogic = filterLogic;40 42 } 41 43 42 public ManipulationContent(ManipulationContent content, Cloner cloner) : base(content, cloner) { } 43 44 public ManipulationContent(ManipulationContent original, Cloner cloner) : 45 base(original, cloner) { 46 ManipulationLogic = cloner.Clone(original.ManipulationLogic); 47 } 44 48 public override IDeepCloneable Clone(Cloner cloner) { 45 49 return new ManipulationContent(this, cloner); 46 50 } 51 52 [StorableConstructor] 53 protected ManipulationContent(bool deserializing) 54 : base(deserializing) { } 55 #endregion 47 56 } 48 57 } -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/MultiScatterPlotContent.cs
r15110 r15274 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 26 27 namespace HeuristicLab.DataPreprocessing { 27 28 28 [Item("Multi Scatter Plot", "Represents a multi scatter plot.")] 29 [StorableClass] 29 30 public class MultiScatterPlotContent : ScatterPlotContent { 30 31 public static new Image StaticItemImage { … … 32 33 } 33 34 35 #region Constructor, Cloning & Persistence 34 36 public MultiScatterPlotContent(IFilteredPreprocessingData preprocessingData) 35 37 : base(preprocessingData) { 36 38 } 37 39 38 public MultiScatterPlotContent(MultiScatterPlotContent content, Cloner cloner)39 : base( content, cloner) {40 public MultiScatterPlotContent(MultiScatterPlotContent original, Cloner cloner) 41 : base(original, cloner) { 40 42 } 41 42 43 public override IDeepCloneable Clone(Cloner cloner) { 43 44 return new MultiScatterPlotContent(this, cloner); 44 45 } 46 47 [StorableConstructor] 48 protected MultiScatterPlotContent(bool deserializing) 49 : base(deserializing) { } 50 #endregion 45 51 } 46 52 } -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs
r15210 r15274 29 29 using HeuristicLab.Core; 30 30 using HeuristicLab.Data; 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 32 32 33 namespace HeuristicLab.DataPreprocessing { 33 34 [Item("PreprocessingChart", "Represents a preprocessing chart.")] 34 public class PreprocessingChartContent : Item, IViewShortcut { 35 [StorableClass] 36 public class PreprocessingChartContent : PreprocessingContent, IViewShortcut { 35 37 public enum LegendOrder { 36 38 Alphabetically, … … 42 44 } 43 45 44 private ICheckedItemList<StringValue> variableItemList = null; 46 [Storable] 47 private ICheckedItemList<StringValue> variableItemList; 45 48 public ICheckedItemList<StringValue> VariableItemList { 46 49 get { 47 50 if (variableItemList == null) 48 51 variableItemList = CreateVariableItemList(PreprocessingData); 49 return this.variableItemList;52 return variableItemList; 50 53 } 51 54 } 52 55 53 public IFilteredPreprocessingData PreprocessingData { get; private set; }54 56 public event DataPreprocessingChangedEventHandler Changed { 55 57 add { PreprocessingData.Changed += value; } … … 57 59 } 58 60 59 public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) { 60 PreprocessingData = preprocessingData; 61 #region Constructor, Cloning & Persistence 62 public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) 63 : base(preprocessingData) { 61 64 } 62 65 63 public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner) 64 : base(content, cloner) { 65 this.PreprocessingData = content.PreprocessingData; 66 this.variableItemList = cloner.Clone<ICheckedItemList<StringValue>>(variableItemList); 66 public PreprocessingChartContent(PreprocessingChartContent original, Cloner cloner) 67 : base(original, cloner) { 68 variableItemList = cloner.Clone(original.variableItemList); 67 69 } 68 70 public override IDeepCloneable Clone(Cloner cloner) { 69 71 return new PreprocessingChartContent(this, cloner); 70 72 } 73 74 [StorableConstructor] 75 protected PreprocessingChartContent(bool deserializing) 76 : base(deserializing) { } 77 #endregion 71 78 72 79 public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/ScatterPlotContent.cs
r15210 r15274 25 25 using HeuristicLab.Analysis; 26 26 using HeuristicLab.Common; 27 using HeuristicLab.Core; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 29 using HeuristicLab.Visualization.ChartControlsExtensions; 28 30 29 31 namespace HeuristicLab.DataPreprocessing { 30 32 [Item("ScatterPlotContent", "")] 33 [StorableClass] 31 34 public abstract class ScatterPlotContent : PreprocessingChartContent { 35 [Storable] 32 36 public string GroupingVariable { get; set; } 33 37 38 #region Constructor, Cloning & Persistence 34 39 protected ScatterPlotContent(IFilteredPreprocessingData preprocessingData) 35 40 : base(preprocessingData) { 36 41 } 37 42 38 protected ScatterPlotContent(ScatterPlotContent content, Cloner cloner) 39 : base(content, cloner) { 43 protected ScatterPlotContent(ScatterPlotContent original, Cloner cloner) 44 : base(original, cloner) { 45 GroupingVariable = original.GroupingVariable; 40 46 } 47 48 [StorableConstructor] 49 protected ScatterPlotContent(bool deserializing) 50 : base(deserializing) { } 51 #endregion 41 52 42 53 public static ScatterPlot CreateScatterPlot(IFilteredPreprocessingData preprocessingData, string variableNameX, string variableNameY, string variableNameGroup = "-", LegendOrder legendOrder = LegendOrder.Alphabetically) { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/SingleScatterPlotContent.cs
r15110 r15274 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 26 27 namespace HeuristicLab.DataPreprocessing { 27 28 28 [Item("Scatter Plot", "Represents a scatter plot.")] 29 [StorableClass] 29 30 public class SingleScatterPlotContent : ScatterPlotContent { 30 31 public static new Image StaticItemImage { … … 32 33 } 33 34 35 [Storable] 34 36 public string SelectedXVariable { get; set; } 37 [Storable] 35 38 public string SelectedYVariable { get; set; } 36 39 40 #region Constructor, Cloning & Persistence 37 41 public SingleScatterPlotContent(IFilteredPreprocessingData preprocessingData) 38 42 : base(preprocessingData) { 39 43 } 40 44 41 public SingleScatterPlotContent(SingleScatterPlotContent content, Cloner cloner) 42 : base(content, cloner) { 43 this.SelectedXVariable = content.SelectedXVariable; 44 this.SelectedYVariable = content.SelectedYVariable; 45 this.GroupingVariable = content.GroupingVariable; 45 public SingleScatterPlotContent(SingleScatterPlotContent original, Cloner cloner) 46 : base(original, cloner) { 47 SelectedXVariable = original.SelectedXVariable; 48 SelectedYVariable = original.SelectedYVariable; 46 49 } 47 48 50 public override IDeepCloneable Clone(Cloner cloner) { 49 51 return new SingleScatterPlotContent(this, cloner); 50 52 } 53 54 [StorableConstructor] 55 protected SingleScatterPlotContent(bool deserializing) 56 : base(deserializing) { } 57 #endregion 51 58 } 52 59 } -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/StatisticsContent.cs
r15270 r15274 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 26 27 namespace HeuristicLab.DataPreprocessing { 27 28 [Item("Statistics", "Represents the statistics grid.")] 28 public class StatisticsContent : Item, IViewShortcut { 29 [StorableClass] 30 public class StatisticsContent : PreprocessingContent, IViewShortcut { 29 31 public static new Image StaticItemImage { 30 32 get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; } 31 33 } 32 34 33 public IPreprocessingData PreprocessingData { get; private set; }35 [Storable] 34 36 public StatisticsLogic StatisticsLogic { get; private set; } 35 37 36 public StatisticsContent(IPreprocessingData preProcessingData, StatisticsLogic statisticsLogic) { 37 PreprocessingData = preProcessingData; 38 #region Constructor, Cloning & Persistence 39 public StatisticsContent(IFilteredPreprocessingData preprocessingData, StatisticsLogic statisticsLogic) 40 : base(preprocessingData) { 38 41 StatisticsLogic = statisticsLogic; 39 42 } 40 43 41 public StatisticsContent(StatisticsContent content, Cloner cloner) 42 : base(content, cloner) { 44 public StatisticsContent(StatisticsContent original, Cloner cloner) 45 : base(original, cloner) { 46 StatisticsLogic = cloner.Clone(original.StatisticsLogic); 43 47 } 44 45 48 public override IDeepCloneable Clone(Cloner cloner) { 46 49 return new StatisticsContent(this, cloner); 47 50 } 51 52 [StorableConstructor] 53 protected StatisticsContent(bool deserializing) 54 : base(deserializing) { } 55 #endregion 48 56 49 57 public event DataPreprocessingChangedEventHandler Changed { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Content/TransformationContent.cs
r15110 r15274 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 using HeuristicLab.Problems.DataAnalysis; 26 27 27 28 namespace HeuristicLab.DataPreprocessing { 28 29 [Item("Transformation", "Represents the transformation grid.")] 29 public class TransformationContent : Item, IViewShortcut { 30 [StorableClass] 31 public class TransformationContent : PreprocessingContent, IViewShortcut { 30 32 public static new Image StaticItemImage { 31 33 get { return HeuristicLab.Common.Resources.VSImageLibrary.Method; } 32 34 } 33 35 34 public IPreprocessingData Data { get; private set; } 35 public FilterLogic FilterLogic { get; private set; } 36 36 [Storable] 37 37 public ICheckedItemList<ITransformation> CheckedTransformationList { get; private set; } 38 38 39 public TransformationContent(IPreprocessingData data, FilterLogic filterLogic) { 40 Data = data; 39 #region Constructor, Cloning & Persistence 40 public TransformationContent(IFilteredPreprocessingData preprocessingData) 41 : base(preprocessingData) { 41 42 CheckedTransformationList = new CheckedItemList<ITransformation>(); 42 FilterLogic = filterLogic;43 43 } 44 44 45 45 public TransformationContent(TransformationContent original, Cloner cloner) 46 46 : base(original, cloner) { 47 Data = original.Data; 48 CheckedTransformationList = new CheckedItemList<ITransformation>(original.CheckedTransformationList); 47 CheckedTransformationList = cloner.Clone(original.CheckedTransformationList); 49 48 } 50 51 49 public override IDeepCloneable Clone(Cloner cloner) { 52 50 return new TransformationContent(this, cloner); 53 51 } 52 53 [StorableConstructor] 54 protected TransformationContent(bool deserializing) 55 : base(deserializing) { } 56 #endregion 54 57 } 55 58 } -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/FilteredPreprocessingData.cs
r15270 r15274 42 42 } 43 43 44 #region Constructor, Cloning & Persist ance44 #region Constructor, Cloning & Persistence 45 45 public FilteredPreprocessingData(IPreprocessingData preporcessingData) 46 46 : base() { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs
r15270 r15274 42 42 protected IList<string> variableNames; 43 43 44 #region Constructor, Cloning & Persist ance44 #region Constructor, Cloning & Persistence 45 45 public PreprocessingData(IDataAnalysisProblemData problemData) 46 46 : base() { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj
r15270 r15274 119 119 <ItemGroup> 120 120 <Compile Include="Content\MultiScatterPlotContent.cs" /> 121 <Compile Include="Content\PreprocessingContent.cs" /> 121 122 <Compile Include="Content\SingleScatterPlotContent.cs" /> 122 123 <Compile Include="Content\ScatterPlotContent.cs" /> … … 135 136 <Compile Include="Data\IPreprocessingData.cs" /> 136 137 <Compile Include="Content\FilterContent.cs" /> 137 <Compile Include="Logic\FilterLogic.cs" />138 138 <Compile Include="Content\HistogramContent.cs" /> 139 139 <Compile Include="Content\LineChartContent.cs" /> -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/ManipulationLogic.cs
r15270 r15274 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 25 27 using HeuristicLab.Data; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 29 using HeuristicLab.Random; 27 30 28 31 namespace HeuristicLab.DataPreprocessing { 29 public class ManipulationLogic { 30 private readonly IPreprocessingData preprocessingData; 32 [Item("ManipulationLogic", "")] 33 [StorableClass] 34 public class ManipulationLogic : Item { 35 36 [Storable] 37 private readonly IFilteredPreprocessingData preprocessingData; 38 39 [Storable] 31 40 private readonly StatisticsLogic statisticsLogic; 32 41 … … 35 44 } 36 45 37 public I PreprocessingData PreProcessingData {46 public IFilteredPreprocessingData PreProcessingData { 38 47 get { return preprocessingData; } 39 48 } 40 49 41 public ManipulationLogic(IPreprocessingData preprocessingData, StatisticsLogic theStatisticsLogic) { 50 #region Constructor, Cloning & Persistence 51 public ManipulationLogic(IFilteredPreprocessingData preprocessingData, StatisticsLogic theStatisticsLogic) { 42 52 this.preprocessingData = preprocessingData; 43 53 statisticsLogic = theStatisticsLogic; 44 54 } 55 public ManipulationLogic(ManipulationLogic original, Cloner cloner) 56 : base(original, cloner) { 57 preprocessingData = cloner.Clone(original.preprocessingData); 58 statisticsLogic = cloner.Clone(original.statisticsLogic); 59 } 60 public override IDeepCloneable Clone(Cloner cloner) { 61 return new ManipulationLogic(this, cloner); 62 } 63 64 [StorableConstructor] 65 protected ManipulationLogic(bool deserializing) 66 : base(deserializing) { } 67 #endregion 45 68 46 69 public void ReplaceIndicesByValue<T>(int columnIndex, IEnumerable<int> rowIndices, T value) { … … 123 146 for (int i = 0; i < count; ++i) { 124 147 if (start == int.MinValue) { 125 start = indexOfPrevPresentValue(column.Key, rowIndices[i]);148 start = IndexOfPrevPresentValue(column.Key, rowIndices[i]); 126 149 } 127 150 if (i + 1 == count || (i + 1 < count && rowIndices[i + 1] - rowIndices[i] > 1)) { 128 int next = indexOfNextPresentValue(column.Key, rowIndices[i]);151 int next = IndexOfNextPresentValue(column.Key, rowIndices[i]); 129 152 if (start > 0 && next < preprocessingData.Rows) { 130 153 startEndings.Add(new Tuple<int, int>(start, next)); … … 144 167 // dont replace first or last values 145 168 if (index > 0 && index < countValues) { 146 int prevIndex = indexOfPrevPresentValue(column.Key, index);147 int nextIndex = indexOfNextPresentValue(column.Key, index);169 int prevIndex = IndexOfPrevPresentValue(column.Key, index); 170 int nextIndex = IndexOfNextPresentValue(column.Key, index); 148 171 149 172 // no neighbours found … … 183 206 } 184 207 185 private int indexOfPrevPresentValue(int columnIndex, int start) {208 private int IndexOfPrevPresentValue(int columnIndex, int start) { 186 209 int offset = start - 1; 187 210 while (offset >= 0 && preprocessingData.IsCellEmpty(columnIndex, offset)) { … … 192 215 } 193 216 194 private int indexOfNextPresentValue(int columnIndex, int start) {217 private int IndexOfNextPresentValue(int columnIndex, int start) { 195 218 int offset = start + 1; 196 219 while (offset < preprocessingData.Rows && preprocessingData.IsCellEmpty(columnIndex, offset)) { -
branches/DataPreprocessing Cleanup/HeuristicLab.DataPreprocessing/3.4/Logic/StatisticsLogic.cs
r15270 r15274 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 28 27 29 namespace HeuristicLab.DataPreprocessing { 28 public class StatisticsLogic { 30 [Item("StatisticsLogic", "")] 31 [StorableClass] 32 public class StatisticsLogic : Item { 33 [Storable] 29 34 private readonly IPreprocessingData preprocessingData; 30 35 36 #region Constructor, Cloning & Persistence 31 37 public StatisticsLogic(IPreprocessingData preprocessingData) { 32 38 this.preprocessingData = preprocessingData; 33 39 } 34 35 public int GetColumnCount() { 36 return preprocessingData.Columns; 37 } 38 39 public int GetRowCount() { 40 return preprocessingData.Rows; 41 } 42 43 public int GetNumericColumnCount() { 44 int count = 0; 45 46 for (int i = 0; i < preprocessingData.Columns; ++i) { 47 if (preprocessingData.VariableHasType<double>(i)) { 48 ++count; 49 } 50 } 51 return count; 52 } 53 54 public int GetNominalColumnCount() { 55 return preprocessingData.Columns - GetNumericColumnCount(); 56 } 40 public StatisticsLogic(StatisticsLogic original, Cloner cloner) 41 : base(original, cloner) { 42 preprocessingData = cloner.Clone(original.preprocessingData); 43 } 44 public override IDeepCloneable Clone(Cloner cloner) { 45 return new StatisticsLogic(this, cloner); 46 } 47 48 [StorableConstructor] 49 protected StatisticsLogic(bool deserializing) 50 : base(deserializing) { } 51 #endregion 57 52 58 53 public int GetMissingValueCount() {
Note: See TracChangeset
for help on using the changeset viewer.