Changeset 4670
- Timestamp:
- 10/29/10 18:28:23 (14 years ago)
- Location:
- branches/CloningRefactoring
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Algorithms.DataAnalysis/3.3/SupportVectorMachine.cs
r4666 r4670 162 162 } 163 163 164 public override IDeepCloneable Clone(Cloner cloner) {165 SupportVectorMachine clone = (SupportVectorMachine)base.Clone(cloner);166 167 return clone;168 }169 170 164 public override void Prepare() { 171 165 if (Problem != null) base.Prepare(); -
branches/CloningRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationCrossover.cs
r4667 r4670 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Operators; -
branches/CloningRefactoring/HeuristicLab.Optimization/3.3/BatchRun.cs
r4665 r4670 172 172 } 173 173 174 pr otectedBatchRun(BatchRun original, Cloner cloner)174 private BatchRun(BatchRun original, Cloner cloner) 175 175 : base(original, cloner) { 176 176 executionState = original.executionState; -
branches/CloningRefactoring/HeuristicLab.Optimization/3.3/Experiment.cs
r4665 r4670 132 132 Initialize(); 133 133 } 134 pr otectedExperiment(Experiment original, Cloner cloner)134 private Experiment(Experiment original, Cloner cloner) 135 135 : base(original, cloner) { 136 136 executionState = original.executionState; -
branches/CloningRefactoring/HeuristicLab.Optimization/3.3/Result.cs
r4665 r4670 108 108 Initialize(); 109 109 } 110 pr otectedResult(Result original, Cloner cloner)110 private Result(Result original, Cloner cloner) 111 111 : base(original, cloner) { 112 112 value = cloner.Clone(original.value); -
branches/CloningRefactoring/HeuristicLab.Optimization/3.3/Run.cs
r4665 r4670 38 38 [StorableConstructor] 39 39 private Run(bool deserializing) : base(deserializing) { } 40 pr otectedRun(Run original, Cloner cloner)40 private Run(Run original, Cloner cloner) 41 41 : base(original, cloner) { 42 42 color = original.color; -
branches/CloningRefactoring/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs
r4665 r4670 55 55 [StorableConstructor] 56 56 private UserDefinedAlgorithm(bool deserializing) : base(deserializing) { } 57 privateUserDefinedAlgorithm(UserDefinedAlgorithm original, Cloner cloner)57 internal UserDefinedAlgorithm(UserDefinedAlgorithm original, Cloner cloner) 58 58 : base(original, cloner) { 59 59 } -
branches/CloningRefactoring/HeuristicLab.Optimization/3.3/UserDefinedProblem.cs
r4665 r4670 222 222 [StorableClass] 223 223 private class EmptyUserDefinedProblemEvaluator : ParameterizedNamedItem, ISingleObjectiveEvaluator { 224 public EmptyUserDefinedProblemEvaluator() : base() { } 224 225 225 [StorableConstructor] 226 226 private EmptyUserDefinedProblemEvaluator(bool deserializing) : base(deserializing) { } -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/BestSelector.cs
r4477 r4670 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; … … 35 36 public sealed class BestSelector : SingleObjectiveSelector, ISingleObjectiveSelector { 36 37 public BestSelector() : base() { } 38 [StorableConstructor] 39 private BestSelector(bool deserializing) : base(deserializing) { } 40 private BestSelector(BestSelector original, Cloner cloner) 41 : base(original, cloner) { 42 } 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new BestSelector(this, cloner); 45 } 46 37 47 38 48 protected override IScope[] Select(List<IScope> scopes) { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/ConditionalSelector.cs
r4477 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 42 43 } 43 44 45 [StorableConstructor] 46 protected ConditionalSelector(bool deserializing) : base(deserializing) { } 47 protected ConditionalSelector(ConditionalSelector original, Cloner cloner) 48 : base(original, cloner) { 49 } 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new ConditionalSelector(this, cloner); 52 } 44 53 public ConditionalSelector() 45 54 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/GenderSpecificSelector.cs
r4068 r4670 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 80 81 81 82 [StorableConstructor] 82 private GenderSpecificSelector(bool deserializing) : base() { } 83 private GenderSpecificSelector(bool deserializing) : base(deserializing) { } 84 [StorableHook(HookType.AfterDeserialization)] 85 private void AfterDeserialization() { 86 Initialize(); 87 } 88 89 protected GenderSpecificSelector(GenderSpecificSelector original, Cloner cloner) 90 : base(original, cloner) { 91 Initialize(); 92 } 93 public override IDeepCloneable Clone(Cloner cloner) { 94 return new GenderSpecificSelector(this, cloner); 95 } 96 83 97 public GenderSpecificSelector() 84 98 : base() { … … 142 156 143 157 #region Helpers 144 [StorableHook(HookType.AfterDeserialization)]145 158 private void Initialize() { 146 159 FemaleSelectorParameter.ValueChanged += new EventHandler(SelectorParameter_ValueChanged); -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/LeftReducer.cs
r4477 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; … … 32 33 [StorableClass] 33 34 public sealed class LeftReducer : Reducer, IReducer { 35 [StorableConstructor] 36 private LeftReducer(bool deserializing) : base(deserializing) { } 37 private LeftReducer(LeftReducer original, Cloner cloner) : base(original, cloner) { } 38 public override IDeepCloneable Clone(Cloner cloner) { 39 return new LeftReducer(this, cloner); 40 } 34 41 public LeftReducer() : base() { } 35 42 -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/LeftSelector.cs
r4477 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 43 44 get { return CopySelectedParameter.Value; } 44 45 set { CopySelectedParameter.Value = value; } 46 } 47 48 [StorableConstructor] 49 private LeftSelector(bool deserializing) : base(deserializing) { } 50 private LeftSelector(LeftSelector original, Cloner cloner) 51 : base(original, cloner) { 52 } 53 public override IDeepCloneable Clone(Cloner cloner) { 54 return new LeftSelector(this, cloner); 45 55 } 46 56 -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/LinearRankSelector.cs
r4477 r4670 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; … … 34 35 [StorableClass] 35 36 public sealed class LinearRankSelector : StochasticSingleObjectiveSelector, ISingleObjectiveSelector { 37 [StorableConstructor] 38 private LinearRankSelector(bool deserializing) : base(deserializing) { } 39 private LinearRankSelector(LinearRankSelector original, Cloner cloner) 40 : base(original, cloner) { 41 } 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new LinearRankSelector(this, cloner); 44 } 36 45 public LinearRankSelector() : base() { } 37 46 -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/MergingReducer.cs
r4477 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; … … 32 33 [StorableClass] 33 34 public sealed class MergingReducer : Reducer, IReducer { 35 [StorableConstructor] 36 private MergingReducer(bool deserializing) : base(deserializing) { } 37 private MergingReducer(MergingReducer original, Cloner cloner) 38 : base(original, cloner) { 39 } 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new MergingReducer(this, cloner); 42 } 34 43 public MergingReducer() : base() { } 35 44 -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/OffspringSelector.cs
r4489 r4670 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 31 32 [StorableClass] 32 33 public class OffspringSelector : SingleSuccessorOperator { 33 34 34 public ValueLookupParameter<DoubleValue> MaximumSelectionPressureParameter { 35 35 get { return (ValueLookupParameter<DoubleValue>)Parameters["MaximumSelectionPressure"]; } … … 62 62 } 63 63 64 [StorableConstructor] 65 private OffspringSelector(bool deserializing) : base(deserializing) { } 66 private OffspringSelector(OffspringSelector original, Cloner cloner) 67 : base(original, cloner) { 68 } 69 public override IDeepCloneable Clone(Cloner cloner) { 70 return new OffspringSelector(this, cloner); 71 } 64 72 public OffspringSelector() 65 73 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/ProportionalSelector.cs
r4477 r4670 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 27 using HeuristicLab.Data; … … 45 46 } 46 47 48 [StorableConstructor] 49 private ProportionalSelector(bool deserializing) : base(deserializing) { } 50 private ProportionalSelector(ProportionalSelector original, Cloner cloner) 51 : base(original, cloner) { 52 } 53 public override IDeepCloneable Clone(Cloner cloner) { 54 return new ProportionalSelector(this, cloner); 55 } 47 56 public ProportionalSelector() 48 57 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/RandomReplacer.cs
r4068 r4670 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 49 50 [StorableConstructor] 50 51 private RandomReplacer(bool deserializing) : base(deserializing) { } 52 private RandomReplacer(RandomReplacer original, Cloner cloner) 53 : base(original, cloner) { 54 } 55 public override IDeepCloneable Clone(Cloner cloner) { 56 return new RandomReplacer(this, cloner); 57 } 51 58 public RandomReplacer() 52 59 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/RandomSelector.cs
r4477 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 46 47 } 47 48 49 [StorableConstructor] 50 private RandomSelector(bool deserializing) : base(deserializing) { } 51 private RandomSelector(RandomSelector original, Cloner cloner) 52 : base(original, cloner) { 53 } 54 public override IDeepCloneable Clone(Cloner cloner) { 55 return new RandomSelector(this, cloner); 56 } 48 57 public RandomSelector() 49 58 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/Reducer.cs
r4068 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Operators; … … 41 42 } 42 43 44 [StorableConstructor] 45 protected Reducer(bool deserializing) : base(deserializing) { } 46 protected Reducer(Reducer original, Cloner cloner) 47 : base(original, cloner) { 48 } 43 49 protected Reducer() 44 50 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/Replacer.cs
r3601 r4670 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 40 41 41 42 [StorableConstructor] 42 protected Replacer(bool deserializing) : base() { } 43 protected Replacer(bool deserializing) : base(deserializing) { } 44 protected Replacer(Replacer original, Cloner cloner) : base(original, cloner) { } 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new Replacer(this, cloner); 47 } 43 48 public Replacer() { 44 49 Parameters.Add(new ValueLookupParameter<ISelector>("ReplacedSelector", "The selection operator to select those scopes that are to be replaced.")); … … 74 79 int remaining = ExecutionContext.Scope.SubScopes[0].SubScopes.Count; 75 80 int selected = ExecutionContext.Scope.SubScopes[1].SubScopes.Count; 76 81 77 82 ISelector replacedSelector = ReplacedSelectorParameter.ActualValue; 78 83 ISelector selectedSelector = SelectedSelectorParameter.ActualValue; 79 84 80 85 if (replacedSelector != null) { 81 86 replacedSelector.CopySelected = new BoolValue(false); -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/RightChildReducer.cs
r4489 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; … … 42 43 [StorableClass] 43 44 public class RightChildReducer : Reducer, IReducer { 45 [StorableConstructor] 46 protected RightChildReducer(bool deserializing) : base(deserializing) { } 47 protected RightChildReducer(RightChildReducer original, Cloner cloner) : base(original, cloner) { } 48 public override IDeepCloneable Clone(Cloner cloner) { 49 return new RightChildReducer(this, cloner); 50 } 51 public RightChildReducer() : base() { } 44 52 /// <summary> 45 53 /// Reduces the sub-scopes, so that the selected sub-scope contains all selected leaves -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/RightReducer.cs
r4477 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; … … 32 33 [StorableClass] 33 34 public sealed class RightReducer : Reducer, IReducer { 35 [StorableConstructor] 36 private RightReducer(bool deserializing) : base(deserializing) { } 37 private RightReducer(RightReducer original, Cloner cloner) : base(original, cloner) { } 38 public override IDeepCloneable Clone(Cloner cloner) { 39 return new RightReducer(this, cloner); 40 } 34 41 public RightReducer() : base() { } 35 42 -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/RightSelector.cs
r4477 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 44 45 set { CopySelectedParameter.Value = value; } 45 46 } 47 [StorableConstructor] 48 private RightSelector(bool deserializing) : base(deserializing) { } 49 private RightSelector(RightSelector original, Cloner cloner) : base(original, cloner) { } 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new RightSelector(this, cloner); 52 } 53 46 54 public RightSelector() 47 55 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/Selector.cs
r4068 r4670 21 21 22 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Operators; … … 43 44 get { return CurrentScopeParameter.ActualValue; } 44 45 } 46 47 [StorableConstructor] 48 protected Selector(bool deserializing) : base(deserializing) { } 49 protected Selector(Selector original, Cloner cloner) : base(original, cloner) { } 45 50 46 51 protected Selector() -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/SingleObjectiveSelector.cs
r4068 r4670 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 50 51 } 51 52 53 [StorableConstructor] 54 protected SingleObjectiveSelector(bool deserializing) : base(deserializing) { } 55 protected SingleObjectiveSelector(SingleObjectiveSelector original, Cloner cloner) : base(original, cloner) { } 56 52 57 protected SingleObjectiveSelector() 53 58 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/StochasticSelector.cs
r4068 r4670 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Optimization; … … 36 37 } 37 38 39 [StorableConstructor] 40 protected StochasticSelector(bool deserializing) : base(deserializing) { } 41 protected StochasticSelector(StochasticSelector original, Cloner cloner) : base(original, cloner) { } 38 42 protected StochasticSelector() 39 43 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/StochasticSingleObjectiveSelector.cs
r4068 r4670 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Optimization; … … 35 36 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 36 37 } 37 38 [StorableConstructor] 39 protected StochasticSingleObjectiveSelector(bool deserializing) : base(deserializing) { } 40 protected StochasticSingleObjectiveSelector(StochasticSingleObjectiveSelector original, Cloner cloner) : base(original, cloner) { } 38 41 protected StochasticSingleObjectiveSelector() 39 42 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/TournamentSelector.cs
r4477 r4670 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; … … 37 38 public ValueLookupParameter<IntValue> GroupSizeParameter { 38 39 get { return (ValueLookupParameter<IntValue>)Parameters["GroupSize"]; } 40 } 41 42 [StorableConstructor] 43 private TournamentSelector(bool deserializing) : base(deserializing) { } 44 private TournamentSelector(TournamentSelector original, Cloner cloner) : base(original, cloner) { } 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new TournamentSelector(this, cloner); 39 47 } 40 48 -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/WorstReplacer.cs
r4068 r4670 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 46 47 [StorableConstructor] 47 48 private WorstReplacer(bool deserializing) : base(deserializing) { } 49 private WorstReplacer(WorstReplacer original, Cloner cloner) : base(original, cloner) { } 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new WorstReplacer(this, cloner); 52 } 48 53 public WorstReplacer() 49 54 : base() { -
branches/CloningRefactoring/HeuristicLab.Selection/3.3/WorstSelector.cs
r4477 r4670 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; … … 34 35 [StorableClass] 35 36 public sealed class WorstSelector : SingleObjectiveSelector, ISingleObjectiveSelector { 37 [StorableConstructor] 38 private WorstSelector(bool deserializing) : base(deserializing) { } 39 private WorstSelector(WorstSelector original, Cloner cloner) : base(original, cloner) { } 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new WorstSelector(this, cloner); 42 } 36 43 public WorstSelector() : base() { } 37 44
Note: See TracChangeset
for help on using the changeset viewer.