- Timestamp:
- 10/29/10 20:26:45 (14 years ago)
- Location:
- branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/AckleyEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 65 66 } 66 67 68 [StorableConstructor] 69 protected AckleyEvaluator(bool deserializing) : base(deserializing) { } 70 protected AckleyEvaluator(AckleyEvaluator original, Cloner cloner) : base(original, cloner) { } 71 public AckleyEvaluator() : base() { } 72 73 public override IDeepCloneable Clone(Cloner cloner) { 74 return new AckleyEvaluator(this, cloner); 75 } 76 67 77 public override RealVector GetBestKnownSolution(int dimension) { 68 78 return new RealVector(dimension); -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/BealeEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 65 66 } 66 67 68 [StorableConstructor] 69 protected BealeEvaluator(bool deserializing) : base(deserializing) { } 70 protected BealeEvaluator(BealeEvaluator original, Cloner cloner) : base(original, cloner) { } 71 public BealeEvaluator() : base() { } 72 73 public override IDeepCloneable Clone(Cloner cloner) { 74 return new BealeEvaluator(this, cloner); 75 } 76 67 77 public override RealVector GetBestKnownSolution(int dimension) { 68 78 if (dimension != 2) throw new ArgumentException(Name + ": This function is only defined for 2 dimensions.", "dimension"); -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/BoothEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 64 65 } 65 66 67 [StorableConstructor] 68 protected BoothEvaluator(bool deserializing) : base(deserializing) { } 69 protected BoothEvaluator(BoothEvaluator original, Cloner cloner) : base(original, cloner) { } 70 public BoothEvaluator() : base() { } 71 72 public override IDeepCloneable Clone(Cloner cloner) { 73 return new BoothEvaluator(this, cloner); 74 } 75 66 76 public override RealVector GetBestKnownSolution(int dimension) { 67 77 if (dimension != 2) throw new ArgumentException(Name + ": This function is only defined for 2 dimensions.", "dimension"); -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/GriewankEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 64 65 public override int MaximumProblemSize { 65 66 get { return int.MaxValue; } 67 } 68 69 [StorableConstructor] 70 protected GriewankEvaluator(bool deserializing) : base(deserializing) { } 71 protected GriewankEvaluator(GriewankEvaluator original, Cloner cloner) : base(original, cloner) { } 72 public GriewankEvaluator() : base() { } 73 74 public override IDeepCloneable Clone(Cloner cloner) { 75 return new GriewankEvaluator(this, cloner); 66 76 } 67 77 -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/LevyEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 62 63 public override int MaximumProblemSize { 63 64 get { return int.MaxValue; } 65 } 66 67 [StorableConstructor] 68 protected LevyEvaluator(bool deserializing) : base(deserializing) { } 69 protected LevyEvaluator(LevyEvaluator original, Cloner cloner) : base(original, cloner) { } 70 public LevyEvaluator() : base() { } 71 72 public override IDeepCloneable Clone(Cloner cloner) { 73 return new LevyEvaluator(this, cloner); 64 74 } 65 75 -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/MatyasEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 64 65 } 65 66 67 [StorableConstructor] 68 protected MatyasEvaluator(bool deserializing) : base(deserializing) { } 69 protected MatyasEvaluator(MatyasEvaluator original, Cloner cloner) : base(original, cloner) { } 70 public MatyasEvaluator() : base() { } 71 72 public override IDeepCloneable Clone(Cloner cloner) { 73 return new MatyasEvaluator(this, cloner); 74 } 75 66 76 public override RealVector GetBestKnownSolution(int dimension) { 67 77 if (dimension != 2) throw new ArgumentException(Name + ": This function is only defined for 2 dimensions.", "dimension"); -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/MultinormalEvaluator.cs
r4068 r4688 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Diagnostics; 4 25 using System.Linq; 26 using HeuristicLab.Common; 5 27 using HeuristicLab.Core; 6 28 using HeuristicLab.Data; … … 23 45 } 24 46 private static Random Random = new Random(); 25 26 [StorableConstructor]27 public MultinormalEvaluator(bool deserializing) { }28 47 29 48 private Dictionary<int, List<RealVector>> stdCenters; … … 66 85 } 67 86 87 [StorableConstructor] 88 protected MultinormalEvaluator(bool deserializing) : base(deserializing) { } 89 protected MultinormalEvaluator(MultinormalEvaluator original, Cloner cloner) : base(original, cloner) { } 68 90 public MultinormalEvaluator() { 69 91 Parameters.Add(new ValueParameter<ItemList<RealVector>>("Centers", "Centers of normal distributions")); … … 72 94 centers = new ItemList<RealVector>(); 73 95 s_2s = new RealVector(); 96 } 97 98 public override IDeepCloneable Clone(Cloner cloner) { 99 return new MultinormalEvaluator(this, cloner); 74 100 } 75 101 -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/RastriginEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 83 84 } 84 85 86 [StorableConstructor] 87 protected RastriginEvaluator(bool deserializing) : base(deserializing) { } 88 protected RastriginEvaluator(RastriginEvaluator original, Cloner cloner) : base(original, cloner) { } 85 89 /// <summary> 86 90 /// Initializes a new instance of the RastriginEvaluator with one parameter (<c>A</c>). … … 89 93 : base() { 90 94 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))); 95 } 96 97 public override IDeepCloneable Clone(Cloner cloner) { 98 return new RastriginEvaluator(this, cloner); 91 99 } 92 100 -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/RosenbrockEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 68 69 } 69 70 71 [StorableConstructor] 72 protected RosenbrockEvaluator(bool deserializing) : base(deserializing) { } 73 protected RosenbrockEvaluator(RosenbrockEvaluator original, Cloner cloner) : base(original, cloner) { } 74 public RosenbrockEvaluator() : base() { } 75 76 public override IDeepCloneable Clone(Cloner cloner) { 77 return new RosenbrockEvaluator(this, cloner); 78 } 79 70 80 public override RealVector GetBestKnownSolution(int dimension) { 71 81 if (dimension < 2) throw new ArgumentException(Name + ": This function is not defined for 1 dimension."); -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SchwefelEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 64 65 } 65 66 67 [StorableConstructor] 68 protected SchwefelEvaluator(bool deserializing) : base(deserializing) { } 69 protected SchwefelEvaluator(SchwefelEvaluator original, Cloner cloner) : base(original, cloner) { } 70 public SchwefelEvaluator() : base() { } 71 72 public override IDeepCloneable Clone(Cloner cloner) { 73 return new SchwefelEvaluator(this, cloner); 74 } 75 66 76 public override RealVector GetBestKnownSolution(int dimension) { 67 77 return null; -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SingleObjectiveTestFunctionProblemEvaluator.cs
r4068 r4688 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 67 68 get { return (ILookupParameter<RealVector>)Parameters["Point"]; } 68 69 } 70 71 [StorableConstructor] 72 protected SingleObjectiveTestFunctionProblemEvaluator(bool deserializing) : base(deserializing) { } 73 protected SingleObjectiveTestFunctionProblemEvaluator(SingleObjectiveTestFunctionProblemEvaluator original, Cloner cloner) : base(original, cloner) { } 69 74 /// <summary> 70 75 /// Initializes a new instance of <see cref="SingleObjectiveTestFunctionEvaluator"/> with two parameters 71 76 /// (<c>Quality</c> and <c>Point</c>). 72 77 /// </summary> 73 public SingleObjectiveTestFunctionProblemEvaluator() { 78 public SingleObjectiveTestFunctionProblemEvaluator() 79 : base() { 74 80 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "Result of the evaluation of a solution.")); 75 81 Parameters.Add(new LookupParameter<RealVector>("Point", "The point at which the function should be evaluated.")); -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SphereEvaluator.cs
r4068 r4688 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 66 67 } 67 68 69 public override IDeepCloneable Clone(Cloner cloner) { 70 return new SphereEvaluator(this, cloner); 71 } 72 68 73 public override RealVector GetBestKnownSolution(int dimension) { 69 74 return new RealVector(dimension); … … 97 102 } 98 103 104 [StorableConstructor] 105 protected SphereEvaluator(bool deserializing) : base(deserializing) { } 106 protected SphereEvaluator(SphereEvaluator original, Cloner cloner) : base(original, cloner) { } 99 107 /// <summary> 100 108 /// Initializes a new instance of the SphereEvaluator with two parameters (<c>C</c> and <c>Alpha</c>). -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/SumSquaresEvaluator.cs
r4068 r4688 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 63 64 } 64 65 66 [StorableConstructor] 67 protected SumSquaresEvaluator(bool deserializing) : base(deserializing) { } 68 protected SumSquaresEvaluator(SumSquaresEvaluator original, Cloner cloner) : base(original, cloner) { } 69 public SumSquaresEvaluator() : base() { } 70 71 public override IDeepCloneable Clone(Cloner cloner) { 72 return new SumSquaresEvaluator(this, cloner); 73 } 74 65 75 public override RealVector GetBestKnownSolution(int dimension) { 66 76 return new RealVector(dimension); -
branches/CloningRefactoring/HeuristicLab.Problems.TestFunctions/3.3/Evaluators/ZakharovEvaluator.cs
r4068 r4688 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 67 68 } 68 69 70 [StorableConstructor] 71 protected ZakharovEvaluator(bool deserializing) : base(deserializing) { } 72 protected ZakharovEvaluator(ZakharovEvaluator original, Cloner cloner) : base(original, cloner) { } 73 public ZakharovEvaluator() : base() { } 74 75 public override IDeepCloneable Clone(Cloner cloner) { 76 return new ZakharovEvaluator(this, cloner); 77 } 78 69 79 /// <summary> 70 80 /// Evaluates the test function for a specific <paramref name="point"/>.
Note: See TracChangeset
for help on using the changeset viewer.