- Timestamp:
- 12/16/16 17:10:05 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinaryMemPR.cs
r14456 r14496 66 66 67 67 protected override double Dist(ISingleObjectiveSolutionScope<BinaryVector> a, ISingleObjectiveSolutionScope<BinaryVector> b) { 68 var len = a.Solution.Length; 69 var acode = a.Solution; 70 var bcode = b.Solution; 71 var hamming = 0; 72 for (var i = 0; i < len; i++) 73 if (acode[i] != bcode[i]) hamming++; 74 return hamming / (double)len; 68 return 1.0 - HammingSimilarityCalculator.CalculateSimilarity(a.Solution, b.Solution); 75 69 } 76 70
Note: See TracChangeset
for help on using the changeset viewer.