Changeset 12126 for trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionSimilarityCalculator.cs
- Timestamp:
- 03/04/15 15:22:21 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionSimilarityCalculator.cs
r12085 r12126 111 111 if (x == null || y == null) return false; 112 112 113 var q1 = x.Variables[QualityVariableName] ;114 var q2 = x.Variables[QualityVariableName];113 var q1 = x.Variables[QualityVariableName].Value; 114 var q2 = y.Variables[QualityVariableName].Value; 115 115 116 116 return CheckQualityEquality(q1, q2) && CalculateSolutionSimilarity(x, y).IsAlmost(1.0); … … 133 133 } 134 134 } 135 return 0; // throw exception?135 return 0; 136 136 } 137 137 … … 147 147 148 148 if (da1 != null && da2 != null) 149 return da1.SequenceEqual(da2);149 return !da1.Zip(da2, Tuple.Create).Any(x => !x.Item1.IsAlmost(x.Item2)); 150 150 151 151 throw new ArgumentException("Could not determine quality equality.");
Note: See TracChangeset
for help on using the changeset viewer.