Changeset 8304 for branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators
- Timestamp:
- 07/19/12 13:19:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators/SingleObjectiveTestFunctionSimilarityCalculator.cs
r8303 r8304 57 57 if (bounds == null) 58 58 throw new ArgumentException("Cannot calculate similarity because no bounds were provided."); 59 if (left == right) return 1.0; 59 60 60 61 double maxSum = 0.0; … … 71 72 } 72 73 73 p rotected override double CalculateSimilarity(IScope left, IScope right) {74 RealVector sol1 = left.Variables[Target].Value as RealVector;75 RealVector sol2 = right.Variables[Target].Value as RealVector;74 public override double CalculateIndividualSimilarity(IScope left, IScope right) { 75 var sol1 = left.Variables[Target].Value as RealVector; 76 var sol2 = right.Variables[Target].Value as RealVector; 76 77 77 78 return CalculateSimilarity(sol1, sol2, Bounds);
Note: See TracChangeset
for help on using the changeset viewer.