Changeset 4722 for trunk/sources/HeuristicLab.Analysis
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Analysis/3.3/Allele.cs
r4623 r4722 53 53 #endregion 54 54 55 #region Storing & Cloning 56 [StorableConstructor] 57 protected Allele(bool deserializing) : base(deserializing) { } 58 protected Allele(Allele original, Cloner cloner) 59 : base(original, cloner) { 60 this.id = original.id; 61 this.impact = original.impact; 62 } 63 public override IDeepCloneable Clone(Cloner cloner) { 64 return new Allele(this, cloner); 65 } 66 #endregion 55 67 public Allele() 56 68 : base() { … … 68 80 this.impact = impact; 69 81 } 70 [StorableConstructor]71 protected Allele(bool deserializing) : base(deserializing) { }72 73 public override IDeepCloneable Clone(Cloner cloner) {74 Allele clone = (Allele)base.Clone(cloner);75 clone.id = id;76 clone.impact = impact;77 return clone;78 }79 82 80 83 public override string ToString() { -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequency.cs
r4623 r4722 89 89 #endregion 90 90 91 #region Storing & Cloning 92 [StorableConstructor] 93 protected AlleleFrequency(bool deserializing) : base(deserializing) { } 94 protected AlleleFrequency(AlleleFrequency original, Cloner cloner) 95 : base(original, cloner) { 96 this.id = original.id; 97 this.frequency = original.frequency; 98 this.averageImpact = original.averageImpact; 99 this.averageSolutionQuality = original.averageSolutionQuality; 100 this.containedInBestKnownSolution = original.containedInBestKnownSolution; 101 this.containedInBestSolution = original.containedInBestSolution; 102 } 103 public override IDeepCloneable Clone(Cloner cloner) { 104 return new AlleleFrequency(this, cloner); 105 } 106 #endregion 91 107 public AlleleFrequency() 92 108 : base() { … … 107 123 this.containedInBestSolution = containedInBestSolution; 108 124 } 109 [StorableConstructor]110 protected AlleleFrequency(bool deserializing) : base(deserializing) { }111 112 public override IDeepCloneable Clone(Cloner cloner) {113 AlleleFrequency clone = (AlleleFrequency)base.Clone(cloner);114 clone.id = id;115 clone.frequency = frequency;116 clone.averageImpact = averageImpact;117 clone.averageSolutionQuality = averageSolutionQuality;118 clone.containedInBestKnownSolution = containedInBestKnownSolution;119 clone.containedInBestSolution = containedInBestSolution;120 return clone;121 }122 125 123 126 public override string ToString() { -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyAnalyzer.cs
r4716 r4722 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; … … 63 64 [StorableConstructor] 64 65 protected AlleleFrequencyAnalyzer(bool deserializing) : base(deserializing) { } 66 protected AlleleFrequencyAnalyzer(AlleleFrequencyAnalyzer<T> original, Cloner cloner) : base(original, cloner) { } 65 67 public AlleleFrequencyAnalyzer() 66 68 : base() { -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyCollection.cs
r4704 r4722 22 22 using System.Collections.Generic; 23 23 using System.Drawing; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 36 37 } 37 38 39 [StorableConstructor] 40 protected AlleleFrequencyCollection(bool deserializing) : base(deserializing) { } 41 protected AlleleFrequencyCollection(AlleleFrequencyCollection original, Cloner cloner) : base(original, cloner) { } 38 42 public AlleleFrequencyCollection() : base() { } 39 43 public AlleleFrequencyCollection(IEnumerable<AlleleFrequency> frequencies) : base(new ItemCollection<AlleleFrequency>(frequencies)) { } 40 [StorableConstructor] 41 protected AlleleFrequencyCollection(bool deserializing) : base(deserializing) { } 44 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new AlleleFrequencyCollection(this, cloner); 47 } 42 48 } 43 49 } -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyCollectionHistory.cs
r4704 r4722 22 22 using System.Collections.Generic; 23 23 using System.Drawing; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 36 37 } 37 38 39 [StorableConstructor] 40 protected AlleleFrequencyCollectionHistory(bool deserializing) : base(deserializing) { } 41 protected AlleleFrequencyCollectionHistory(AlleleFrequencyCollectionHistory original, Cloner cloner) : base(original, cloner) { } 38 42 public AlleleFrequencyCollectionHistory() : base() { } 39 43 public AlleleFrequencyCollectionHistory(IEnumerable<AlleleFrequencyCollection> collections) : base(new ItemCollection<AlleleFrequencyCollection>(collections)) { } 40 [StorableConstructor] 41 protected AlleleFrequencyCollectionHistory(bool deserializing) : base(deserializing) { } 44 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new AlleleFrequencyCollectionHistory(this, cloner); 47 } 42 48 } 43 49 } -
trunk/sources/HeuristicLab.Analysis/3.3/BestAverageWorstQualityAnalyzer.cs
r3787 r4722 82 82 #endregion 83 83 84 #region Storing & Cloning 85 [StorableConstructor] 86 private BestAverageWorstQualityAnalyzer(bool deserializing) : base(deserializing) { } 87 private BestAverageWorstQualityAnalyzer(BestAverageWorstQualityAnalyzer original, Cloner cloner) 88 : base(original, cloner) { 89 Initialize(); 90 } 91 public override IDeepCloneable Clone(Cloner cloner) { 92 return new BestAverageWorstQualityAnalyzer(this, cloner); 93 } 94 #endregion 84 95 public BestAverageWorstQualityAnalyzer() 85 96 : base() { … … 151 162 Initialize(); 152 163 } 153 [StorableConstructor]154 private BestAverageWorstQualityAnalyzer(bool deserializing) : base() { }155 164 156 165 [StorableHook(HookType.AfterDeserialization)] 166 private void AfterDeserialization() { 167 Initialize(); 168 } 169 157 170 private void Initialize() { 158 171 QualityParameter.DepthChanged += new EventHandler(QualityParameter_DepthChanged); 159 }160 161 public override IDeepCloneable Clone(Cloner cloner) {162 BestAverageWorstQualityAnalyzer clone = (BestAverageWorstQualityAnalyzer)base.Clone(cloner);163 clone.Initialize();164 return clone;165 172 } 166 173 -
trunk/sources/HeuristicLab.Analysis/3.3/BestAverageWorstQualityCalculator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 49 50 } 50 51 52 #region Storing & Cloning 53 [StorableConstructor] 54 private BestAverageWorstQualityCalculator(bool deserializing) : base(deserializing) { } 55 private BestAverageWorstQualityCalculator(BestAverageWorstQualityCalculator original, Cloner cloner) : base(original, cloner) { } 56 public override IDeepCloneable Clone(Cloner cloner) { 57 return new BestAverageWorstQualityCalculator(this, cloner); 58 } 59 #endregion 51 60 public BestAverageWorstQualityCalculator() 52 61 : base() { -
trunk/sources/HeuristicLab.Analysis/3.3/BestQualityMemorizer.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 43 44 } 44 45 46 #region Storing & Cloning 47 [StorableConstructor] 48 protected BestQualityMemorizer(bool deserializing) : base(deserializing) { } 49 protected BestQualityMemorizer(BestQualityMemorizer original, Cloner cloner) : base(original, cloner) { } 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new BestQualityMemorizer(this, cloner); 52 } 53 #endregion 45 54 public BestQualityMemorizer() 46 55 : base() { -
trunk/sources/HeuristicLab.Analysis/3.3/BestScopeSolutionAnalyzer.cs
r3901 r4722 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; … … 55 56 } 56 57 58 #region Storing & Cloning 59 [StorableConstructor] 60 protected BestScopeSolutionAnalyzer(bool deserializing) : base(deserializing) { } 61 protected BestScopeSolutionAnalyzer(BestScopeSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { } 62 public override IDeepCloneable Clone(Cloner cloner) { 63 return new BestScopeSolutionAnalyzer(this, cloner); 64 } 65 #endregion 57 66 public BestScopeSolutionAnalyzer() 58 67 : base() { -
trunk/sources/HeuristicLab.Analysis/3.3/DataRow.cs
r4703 r4722 66 66 #endregion 67 67 68 #region Storing & Cloning 69 [StorableConstructor] 70 private DataRow(bool deserializing) : base(deserializing) { } 71 private DataRow(DataRow original, Cloner cloner) 72 : base(original, cloner) { 73 this.VisualProperties = (DataRowVisualProperties)cloner.Clone(original.visualProperties); 74 this.values = new ObservableList<double>(original.values); 75 } 76 public override IDeepCloneable Clone(Cloner cloner) { 77 return new DataRow(this, cloner); 78 } 79 #endregion 68 80 public DataRow() 69 81 : base() { … … 86 98 values = new ObservableList<double>(); 87 99 } 88 [StorableConstructor]89 private DataRow(bool deserializing) { }90 100 91 101 // BackwardsCompatibility3.3 … … 96 106 } 97 107 #endregion 98 99 public override IDeepCloneable Clone(Cloner cloner) {100 DataRow clone = new DataRow(Name, Description);101 cloner.RegisterClonedObject(this, clone);102 clone.VisualProperties = (DataRowVisualProperties)cloner.Clone(visualProperties);103 clone.values.AddRange(values);104 return clone;105 }106 108 107 109 public event EventHandler VisualPropertiesChanged; -
trunk/sources/HeuristicLab.Analysis/3.3/DataRowVisualProperties.cs
r4648 r4722 21 21 22 22 using System.ComponentModel; 23 using System.Drawing; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using System.Drawing;26 26 27 27 namespace HeuristicLab.Analysis { … … 104 104 #endregion 105 105 106 #region Storing & Cloning 107 [StorableConstructor] 108 protected DataRowVisualProperties(bool deserializing) : base() { } 109 protected DataRowVisualProperties(DataRowVisualProperties original, Cloner cloner) 110 : base(original, cloner) { 111 this.chartType = original.chartType; 112 this.secondYAxis = original.secondYAxis; 113 this.color = original.color; 114 this.startIndexZero = original.startIndexZero; 115 } 116 public override IDeepCloneable Clone(Cloner cloner) { 117 return new DataRowVisualProperties(this, cloner); 118 } 119 #endregion 106 120 public DataRowVisualProperties() { 107 121 chartType = DataRowChartType.Line; … … 116 130 this.startIndexZero = startIndexZero; 117 131 } 118 [StorableConstructor]119 protected DataRowVisualProperties(bool deserializing) { }120 121 public override IDeepCloneable Clone(Cloner cloner) {122 DataRowVisualProperties clone = (DataRowVisualProperties)base.Clone(cloner);123 clone.chartType = chartType;124 clone.secondYAxis = secondYAxis;125 clone.color = color;126 clone.startIndexZero = startIndexZero;127 return clone;128 }129 132 130 133 public event PropertyChangedEventHandler PropertyChanged; -
trunk/sources/HeuristicLab.Analysis/3.3/DataTable.cs
r4702 r4722 47 47 } 48 48 49 #region Storing & Cloning 50 [StorableConstructor] 51 private DataTable(bool deserializing) : base(deserializing) { } 52 private DataTable(DataTable original, Cloner cloner) 53 : base(original, cloner) { 54 this.rows = cloner.Clone(original.rows); 55 this.RegisterRowsEvents(); 56 } 57 public override IDeepCloneable Clone(Cloner cloner) { 58 return new DataTable(this, cloner); 59 } 60 #endregion 49 61 public DataTable() 50 62 : base() { … … 127 139 private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) { 128 140 this.OnReset(); 129 }130 131 public override IDeepCloneable Clone(Cloner cloner) {132 DataTable clone = new DataTable(Name, Description);133 cloner.RegisterClonedObject(this, clone);134 clone.rows = (NamedItemCollection<DataRow>)cloner.Clone(rows);135 return clone;136 141 } 137 142 -
trunk/sources/HeuristicLab.Analysis/3.3/DataTableHistory.cs
r4703 r4722 22 22 using System.Collections.Generic; 23 23 using System.Drawing; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 36 37 } 37 38 39 [StorableConstructor] 40 protected DataTableHistory(bool deserializing) : base(deserializing) { } 41 protected DataTableHistory(DataTableHistory original, Cloner cloner) : base(original, cloner) { } 38 42 public DataTableHistory() : base() { } 39 43 public DataTableHistory(IEnumerable<DataTable> collection) : base(new ItemCollection<DataTable>(collection)) { } 40 [StorableConstructor] 41 protected DataTableHistory(bool deserializing) : base(deserializing) { } 44 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new DataTableHistory(this, cloner); 47 } 42 48 } 43 49 } -
trunk/sources/HeuristicLab.Analysis/3.3/DataTableValuesCollector.cs
r4068 r4722 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; … … 39 40 } 40 41 42 #region Storing & Cloning 43 [StorableConstructor] 44 protected DataTableValuesCollector(bool deserializing) : base(deserializing) { } 45 protected DataTableValuesCollector(DataTableValuesCollector original, Cloner cloner) : base(original, cloner) { } 46 public override IDeepCloneable Clone(Cloner cloner) { 47 return new DataTableValuesCollector(this, cloner); 48 } 49 #endregion 41 50 public DataTableValuesCollector() 42 51 : base() { -
trunk/sources/HeuristicLab.Analysis/3.3/HeatMap.cs
r4715 r4722 35 35 } 36 36 37 [StorableConstructor] 38 protected HeatMap(bool deserializing) : base(deserializing) { } 39 protected HeatMap(HeatMap original, Cloner cloner) : base(original, cloner) { } 37 40 public HeatMap() : base() { } 38 41 public HeatMap(int rows, int columns) : base(rows, columns) { } … … 44 47 45 48 public override IDeepCloneable Clone(Cloner cloner) { 46 HeatMap clone = new HeatMap(); 47 cloner.RegisterClonedObject(this, clone); 48 clone.matrix = (double[,])matrix.Clone(); 49 clone.columnNames = new List<string>(columnNames); 50 clone.rowNames = new List<string>(rowNames); 51 clone.sortableView = sortableView; 52 clone.readOnly = readOnly; 53 return clone; 49 return new HeatMap(this, cloner); 54 50 } 55 51 -
trunk/sources/HeuristicLab.Analysis/3.3/HeatMapHistory.cs
r4703 r4722 22 22 using System.Collections.Generic; 23 23 using System.Drawing; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 36 37 } 37 38 39 [StorableConstructor] 40 protected HeatMapHistory(bool deserializing) : base(deserializing) { } 41 protected HeatMapHistory(HeatMapHistory original, Cloner cloner) : base(original, cloner) { } 38 42 public HeatMapHistory() : base() { } 39 43 public HeatMapHistory(IEnumerable<HeatMap> collection) : base(new ItemCollection<HeatMap>(collection)) { } 40 [StorableConstructor] 41 protected HeatMapHistory(bool deserializing) : base(deserializing) { } 44 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new HeatMapHistory(this, cloner); 47 } 42 48 } 43 49 } -
trunk/sources/HeuristicLab.Analysis/3.3/MinAverageMaxValueAnalyzer.cs
r3710 r4722 83 83 [Storable] 84 84 private ResultsCollector resultsCollector; 85 86 #region Storing & Cloning 87 [StorableConstructor] 88 private MinAverageMaxValueAnalyzer(bool deserializing) : base(deserializing) { } 89 private MinAverageMaxValueAnalyzer(MinAverageMaxValueAnalyzer original, Cloner cloner) 90 : base(original, cloner) { 91 resultsCollector = cloner.Clone(original.resultsCollector); 92 Initialize(); 93 } 94 public override IDeepCloneable Clone(Cloner cloner) { 95 return new MinAverageMaxValueAnalyzer(this, cloner); 96 } 97 #endregion 85 98 public MinAverageMaxValueAnalyzer() 86 99 : base() { … … 132 145 Initialize(); 133 146 } 134 [StorableConstructor]135 private MinAverageMaxValueAnalyzer(bool deserializing) : base() { }136 147 137 148 [StorableHook(HookType.AfterDeserialization)] … … 139 150 ValueParameter.DepthChanged += new EventHandler(ValueParameter_DepthChanged); 140 151 CollectMinValueInResultsParameter.ValueChanged += new EventHandler(CollectMinValueInResultsParameter_ValueChanged); 141 CollectMinValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectMinValueInResultsParameter_Value Changed);152 CollectMinValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectMinValueInResultsParameter_Value_ValueChanged); 142 153 CollectMaxValueInResultsParameter.ValueChanged += new EventHandler(CollectMaxValueInResultsParameter_ValueChanged); 143 CollectMaxValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectMaxValueInResultsParameter_Value Changed);154 CollectMaxValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectMaxValueInResultsParameter_Value_ValueChanged); 144 155 CollectAverageValueInResultsParameter.ValueChanged += new EventHandler(CollectAverageValueInResultsParameter_ValueChanged); 145 CollectAverageValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectAverageValueInResultsParameter_Value Changed);156 CollectAverageValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectAverageValueInResultsParameter_Value_ValueChanged); 146 157 } 147 158 148 159 private void CollectAverageValueInResultsParameter_ValueChanged(object sender, EventArgs e) { 149 if (CollectAverageValueInResults.Value) 160 IParameter avgValueParameter; 161 resultsCollector.CollectedValues.TryGetValue("AverageValue", out avgValueParameter); 162 if (CollectAverageValueInResults.Value && avgValueParameter == null) 150 163 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("AverageValue", null, AverageValueParameter.Name)); 151 else { 152 IParameter avgValueParameter; 153 resultsCollector.CollectedValues.TryGetValue("AverageValue", out avgValueParameter); 164 else if (!CollectAverageValueInResults.Value && avgValueParameter != null) 154 165 resultsCollector.CollectedValues.Remove(avgValueParameter); 155 } 166 CollectAverageValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectAverageValueInResultsParameter_Value_ValueChanged); 167 } 168 169 private void CollectAverageValueInResultsParameter_Value_ValueChanged(object sender, EventArgs e) { 170 IParameter avgValueParameter; 171 resultsCollector.CollectedValues.TryGetValue("AverageValue", out avgValueParameter); 172 if (CollectAverageValueInResults.Value && avgValueParameter == null) 173 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("AverageValue", null, AverageValueParameter.Name)); 174 else if (!CollectAverageValueInResults.Value && avgValueParameter != null) 175 resultsCollector.CollectedValues.Remove(avgValueParameter); 156 176 } 157 177 158 178 private void CollectMaxValueInResultsParameter_ValueChanged(object sender, EventArgs e) { 159 if (CollectMaxValueInResults.Value) 179 IParameter maxValueParameter; 180 resultsCollector.CollectedValues.TryGetValue("MaxValue", out maxValueParameter); 181 if (CollectMaxValueInResults.Value && maxValueParameter == null) 160 182 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MaxValue", null, MaxValueParameter.Name)); 161 else { 162 IParameter maxValueParameter; 163 resultsCollector.CollectedValues.TryGetValue("MaxValue", out maxValueParameter); 183 else if (!CollectMaxValueInResults.Value && maxValueParameter != null) 184 resultsCollector.CollectedValues.Remove(maxValueParameter); 185 CollectMaxValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectMaxValueInResultsParameter_Value_ValueChanged); 186 } 187 188 private void CollectMaxValueInResultsParameter_Value_ValueChanged(object sender, EventArgs e) { 189 IParameter maxValueParameter; 190 resultsCollector.CollectedValues.TryGetValue("MaxValue", out maxValueParameter); 191 if (CollectMaxValueInResults.Value && maxValueParameter == null) 192 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MaxValue", null, MaxValueParameter.Name)); 193 else if (!CollectMaxValueInResults.Value && maxValueParameter != null) 164 194 resultsCollector.CollectedValues.Remove(maxValueParameter); 165 195 } 166 }167 196 168 197 private void CollectMinValueInResultsParameter_ValueChanged(object sender, EventArgs e) { 169 if (CollectMinValueInResults.Value) 198 IParameter minValueParameter; 199 resultsCollector.CollectedValues.TryGetValue("MinValue", out minValueParameter); 200 if (CollectMinValueInResults.Value && minValueParameter == null) 170 201 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MinValue", null, MinValueParameter.Name)); 171 else { 172 IParameter minValueParameter; 173 resultsCollector.CollectedValues.TryGetValue("MinValue", out minValueParameter); 202 else if (!CollectMinValueInResults.Value && minValueParameter != null) 174 203 resultsCollector.CollectedValues.Remove(minValueParameter); 175 } 176 } 177 178 public override IDeepCloneable Clone(Cloner cloner) { 179 MinAverageMaxValueAnalyzer clone = (MinAverageMaxValueAnalyzer)base.Clone(cloner); 180 clone.Initialize(); 181 return clone; 204 CollectMinValueInResultsParameter.Value.ValueChanged += new EventHandler(CollectMinValueInResultsParameter_Value_ValueChanged); 205 } 206 207 private void CollectMinValueInResultsParameter_Value_ValueChanged(object sender, EventArgs e) { 208 IParameter minValueParameter; 209 resultsCollector.CollectedValues.TryGetValue("MinValue", out minValueParameter); 210 if (CollectMinValueInResults.Value && minValueParameter == null) 211 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MinValue", null, MinValueParameter.Name)); 212 else if (!CollectMinValueInResults.Value && minValueParameter != null) 213 resultsCollector.CollectedValues.Remove(minValueParameter); 182 214 } 183 215 -
trunk/sources/HeuristicLab.Analysis/3.3/MinAverageMaxValueCalculator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 46 47 } 47 48 49 #region Storing & Cloning 50 [StorableConstructor] 51 private MinAverageMaxValueCalculator(bool deserializing) : base(deserializing) { } 52 private MinAverageMaxValueCalculator(MinAverageMaxValueCalculator original, Cloner cloner) : base(original, cloner) { } 53 public override IDeepCloneable Clone(Cloner cloner) { 54 return new MinAverageMaxValueCalculator(this, cloner); 55 } 56 #endregion 48 57 public MinAverageMaxValueCalculator() 49 58 : base() { -
trunk/sources/HeuristicLab.Analysis/3.3/MultiAnalyzer.cs
r4641 r4722 21 21 22 22 using HeuristicLab.Collections; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 51 52 } 52 53 54 #region Storing & Cloning 55 [StorableConstructor] 56 protected MultiAnalyzer(bool deserializing) : base(deserializing) { } 57 protected MultiAnalyzer(MultiAnalyzer original, Cloner cloner) : base(original, cloner) { } 58 public override IDeepCloneable Clone(Cloner cloner) { 59 return new MultiAnalyzer(this, cloner); 60 } 61 #endregion 53 62 public MultiAnalyzer() 54 63 : base() { … … 56 65 Parameters.Add(new LookupParameter<IntValue>("UpdateCounter", "The value which counts how many times the MultiAnalyzer was called since the last update.", "MultiAnalyzerUpdateCounter")); 57 66 } 58 [StorableConstructor]59 protected MultiAnalyzer(bool deserializing) : base(deserializing) { }60 67 61 68 public override IOperation Apply() { -
trunk/sources/HeuristicLab.Analysis/3.3/PopulationDiversityAnalyzer.cs
r4715 r4722 21 21 22 22 using System.Linq; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 59 60 [StorableConstructor] 60 61 protected PopulationDiversityAnalyzer(bool deserializing) : base(deserializing) { } 62 protected PopulationDiversityAnalyzer(PopulationDiversityAnalyzer<T> original, Cloner cloner) : base(original, cloner) { } 61 63 public PopulationDiversityAnalyzer() 62 64 : base() { -
trunk/sources/HeuristicLab.Analysis/3.3/QualityAnalyzer.cs
r3662 r4722 79 79 #endregion 80 80 81 #region Storing & Cloning 82 [StorableConstructor] 83 private QualityAnalyzer(bool deserializing) : base(deserializing) { } 84 private QualityAnalyzer(QualityAnalyzer original, Cloner cloner) 85 : base(original, cloner) { 86 Initialize(); 87 } 88 public override IDeepCloneable Clone(Cloner cloner) { 89 return new QualityAnalyzer(this, cloner); 90 } 91 #endregion 81 92 public QualityAnalyzer() 82 93 : base() { … … 141 152 Initialize(); 142 153 } 143 [StorableConstructor]144 private QualityAnalyzer(bool deserializing) : base() { }145 154 146 155 [StorableHook(HookType.AfterDeserialization)] 156 private void AfterDeserialization() { 157 Initialize(); 158 } 159 147 160 private void Initialize() { 148 161 QualityParameter.DepthChanged += new EventHandler(QualityParameter_DepthChanged); 149 }150 151 public override IDeepCloneable Clone(Cloner cloner) {152 QualityAnalyzer clone = (QualityAnalyzer)base.Clone(cloner);153 clone.Initialize();154 return clone;155 162 } 156 163 -
trunk/sources/HeuristicLab.Analysis/3.3/QualityDifferenceCalculator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 46 47 } 47 48 49 #region Storing & Cloning 50 [StorableConstructor] 51 protected QualityDifferenceCalculator(bool deserializing) : base(deserializing) { } 52 protected QualityDifferenceCalculator(QualityDifferenceCalculator original, Cloner cloner) : base(original, cloner) { } 53 public override IDeepCloneable Clone(Cloner cloner) { 54 return new QualityDifferenceCalculator(this, cloner); 55 } 56 #endregion 48 57 public QualityDifferenceCalculator() 49 58 : base() { -
trunk/sources/HeuristicLab.Analysis/3.3/ValueAnalyzer.cs
r3662 r4722 58 58 #endregion 59 59 60 #region Storing & Cloning 61 [StorableConstructor] 62 private ValueAnalyzer(bool deserializing) : base(deserializing) { } 63 private ValueAnalyzer(ValueAnalyzer original, Cloner cloner) 64 : base(original, cloner) { 65 Initialize(); 66 } 67 public override IDeepCloneable Clone(Cloner cloner) { 68 return new ValueAnalyzer(this, cloner); 69 } 70 #endregion 60 71 public ValueAnalyzer() 61 72 : base() { … … 88 99 Initialize(); 89 100 } 90 [StorableConstructor]91 private ValueAnalyzer(bool deserializing) : base() { }92 101 93 102 [StorableHook(HookType.AfterDeserialization)] 103 private void AfterDeserialization() { 104 Initialize(); 105 } 106 94 107 private void Initialize() { 95 108 ValueParameter.DepthChanged += new EventHandler(ValueParameter_DepthChanged); 96 }97 98 public override IDeepCloneable Clone(Cloner cloner) {99 ValueAnalyzer clone = (ValueAnalyzer)base.Clone(cloner);100 clone.Initialize();101 return clone;102 109 } 103 110
Note: See TracChangeset
for help on using the changeset viewer.