Changeset 8303 for branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators
- Timestamp:
- 07/19/12 11:04:48 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators/SingleObjectiveTestFunctionSimilarityCalculator.cs
r8086 r8303 26 26 using HeuristicLab.Encodings.RealVectorEncoding; 27 27 using HeuristicLab.Optimization.Operators; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Problems.TestFunctions { … … 32 33 /// </summary> 33 34 [Item("SingleObjectiveTestFunctionSimilarityCalculator", "An operator that performs similarity calculation between two test functions solutions.")] 35 [StorableClass] 34 36 public sealed class SingleObjectiveTestFunctionSimilarityCalculator : SimilarityCalculator { 35 37 #region Properties 38 [Storable] 36 39 public DoubleMatrix Bounds { get; set; } 37 40 #endregion 38 41 42 [StorableConstructor] 39 43 private SingleObjectiveTestFunctionSimilarityCalculator(bool deserializing) : base(deserializing) { } 40 private SingleObjectiveTestFunctionSimilarityCalculator(SingleObjectiveTestFunctionSimilarityCalculator original, Cloner cloner) : base(original, cloner) { } 44 private SingleObjectiveTestFunctionSimilarityCalculator(SingleObjectiveTestFunctionSimilarityCalculator original, Cloner cloner) 45 : base(original, cloner) { 46 this.Bounds = cloner.Clone(original.Bounds); 47 } 41 48 public SingleObjectiveTestFunctionSimilarityCalculator() : base() { } 49 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new SingleObjectiveTestFunctionSimilarityCalculator(this, cloner); 52 } 42 53 43 54 public static double CalculateSimilarity(RealVector left, RealVector right, DoubleMatrix bounds) {
Note: See TracChangeset
for help on using the changeset viewer.