- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 16 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.Problems.TestFunctions/3.3/MoveEvaluators/AckleyAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(AckleyEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected AckleyAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected AckleyAdditiveMoveEvaluator(AckleyAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public AckleyAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new AckleyAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/AdditiveMoveEvaluator.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 51 52 } 52 53 54 [StorableConstructor] 55 protected AdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 56 protected AdditiveMoveEvaluator(AdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 53 57 protected AdditiveMoveEvaluator() 54 58 : base() { -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/BealeAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(BealeEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected BealeAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected BealeAdditiveMoveEvaluator(BealeAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public BealeAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new BealeAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/BoothAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(BoothEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected BoothAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected BoothAdditiveMoveEvaluator(BoothAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public BoothAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new BoothAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/GriewankAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(GriewankEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected GriewankAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected GriewankAdditiveMoveEvaluator(GriewankAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public GriewankAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new GriewankAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/LevyAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(LevyEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected LevyAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected LevyAdditiveMoveEvaluator(LevyAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public LevyAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new LevyAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/MatyasAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(MatyasEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected MatyasAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected MatyasAdditiveMoveEvaluator(MatyasAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public MatyasAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new MatyasAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/MultinormalAdditiveMoveEvaluator.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Encodings.RealVectorEncoding; … … 35 36 } 36 37 37 MultinormalEvaluator evaluator = new MultinormalEvaluator(); 38 38 [StorableConstructor] 39 protected MultinormalAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 40 protected MultinormalAdditiveMoveEvaluator(MultinormalAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 39 41 public MultinormalAdditiveMoveEvaluator() { 40 42 Parameters.Add(new LookupParameter<ISingleObjectiveTestFunctionProblemEvaluator>("Evaluator", "")); 43 } 44 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new MultinormalAdditiveMoveEvaluator(this, cloner); 41 47 } 42 48 -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RastriginAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 47 48 } 48 49 50 [StorableConstructor] 51 protected RastriginAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 52 protected RastriginAdditiveMoveEvaluator(RastriginAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 49 53 public RastriginAdditiveMoveEvaluator() { 50 54 Parameters.Add(new ValueParameter<DoubleValue>("A", "The parameter A is a parameter of the objective function y = Sum((x_i)^2 + A * (1 - Cos(2pi*x_i))). Default is A = 10.", new DoubleValue(10))); 55 } 56 57 public override IDeepCloneable Clone(Cloner cloner) { 58 return new RastriginAdditiveMoveEvaluator(this, cloner); 51 59 } 52 60 -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RealVectorAdditiveMoveWrapper.cs
r3450 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Encodings.RealVectorEncoding; 23 24 … … 26 27 /// This wrapper disguises as real vector for use in the evaluation functions. 27 28 /// </summary> 28 internal class RealVectorAdditiveMoveWrapper : RealVector {29 internal sealed class RealVectorAdditiveMoveWrapper : RealVector { 29 30 private int dimension; 30 31 private double moveDistance; 31 32 private RealVector vector; 32 33 34 private RealVectorAdditiveMoveWrapper(bool deserializing) : base(deserializing) { } 35 private RealVectorAdditiveMoveWrapper(RealVectorAdditiveMoveWrapper original, Cloner cloner) 36 : base(original, cloner) { 37 this.dimension = original.dimension; 38 this.moveDistance = original.moveDistance; 39 this.vector = cloner.Clone(vector); 40 } 33 41 public RealVectorAdditiveMoveWrapper() { 34 42 dimension = -1; … … 36 44 this.vector = new RealVector(); 37 45 } 38 39 46 public RealVectorAdditiveMoveWrapper(AdditiveMove move, RealVector vector) { 40 47 dimension = move.Dimension; 41 48 moveDistance = move.MoveDistance; 42 49 this.vector = vector; 50 } 51 52 public override IDeepCloneable Clone(Cloner cloner) { 53 return new RealVectorAdditiveMoveWrapper(this, cloner); 43 54 } 44 55 -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/RosenbrockAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(RosenbrockEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected RosenbrockAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected RosenbrockAdditiveMoveEvaluator(RosenbrockAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public RosenbrockAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new RosenbrockAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SchwefelAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(SchwefelEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected SchwefelAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected SchwefelAdditiveMoveEvaluator(SchwefelAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public SchwefelAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new SchwefelAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SphereAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 61 62 } 62 63 64 [StorableConstructor] 65 protected SphereAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 66 protected SphereAdditiveMoveEvaluator(SphereAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 63 67 public SphereAdditiveMoveEvaluator() { 64 68 Parameters.Add(new ValueParameter<DoubleValue>("C", "The parameter C modifies the steepness of the objective function y = C * ||X||^Alpha. Default is C = 1.", new DoubleValue(1))); 65 69 Parameters.Add(new ValueParameter<DoubleValue>("Alpha", "The parameter Alpha modifies the steepness of the objective function y = C * ||X||^Alpha. Default is Alpha = 2.", new DoubleValue(2))); 70 } 71 72 public override IDeepCloneable Clone(Cloner cloner) { 73 return new SphereAdditiveMoveEvaluator(this, cloner); 66 74 } 67 75 -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/SumSquaresAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(SumSquaresEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected SumSquaresAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected SumSquaresAdditiveMoveEvaluator(SumSquaresAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public SumSquaresAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new SumSquaresAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point); -
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/MoveEvaluators/ZakharovAdditiveMoveEvaluator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.RealVectorEncoding; … … 31 32 get { return typeof(ZakharovEvaluator); } 32 33 } 34 35 [StorableConstructor] 36 protected ZakharovAdditiveMoveEvaluator(bool deserializing) : base(deserializing) { } 37 protected ZakharovAdditiveMoveEvaluator(ZakharovAdditiveMoveEvaluator original, Cloner cloner) : base(original, cloner) { } 38 public ZakharovAdditiveMoveEvaluator() : base() { } 39 40 public override IDeepCloneable Clone(Cloner cloner) { 41 return new ZakharovAdditiveMoveEvaluator(this, cloner); 42 } 43 33 44 protected override double Evaluate(double quality, RealVector point, AdditiveMove move) { 34 45 RealVectorAdditiveMoveWrapper wrapper = new RealVectorAdditiveMoveWrapper(move, point);
Note: See TracChangeset
for help on using the changeset viewer.