Changeset 7423 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPIntegerVectorProximityCalculator.cs
- Timestamp:
- 01/27/12 16:32:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPIntegerVectorProximityCalculator.cs
r7412 r7423 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using HeuristicLab.Encodings.IntegerVectorEncoding; 23 24 … … 35 36 return 1.0 - CalculateGenotypeSimilarity(a, b); 36 37 } 38 39 public static IEnumerable<int> GetDifference(IntegerVector a, IntegerVector b) { 40 for (int i = 0; i < a.Length; i++) 41 if (a[i] != b[i]) yield return i; 42 } 37 43 } 38 44 }
Note: See TracChangeset
for help on using the changeset viewer.