Changeset 15256 for branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs
- Timestamp:
- 07/15/17 14:25:44 (7 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding
-
Property
svn:mergeinfo
set to
/trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding merged eligible
-
Property
svn:mergeinfo
set to
-
branches/PerformanceComparison/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs
r14659 r15256 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 24 using HeuristicLab.PluginInfrastructure; 23 25 24 26 namespace HeuristicLab.Encodings.LinearLinkageEncoding { 27 [NonDiscoverableType] 25 28 public class LinearLinkageEqualityComparer : EqualityComparer<LinearLinkage> { 26 29 public override bool Equals(LinearLinkage x, LinearLinkage y) { 27 if ( x == null && y == null) return true;30 if (ReferenceEquals(x, y)) return true; 28 31 if (x == null || y == null) return false; 29 32 if (x.Length != y.Length) return false; … … 34 37 35 38 public override int GetHashCode(LinearLinkage obj) { 39 if (obj == null) throw new ArgumentNullException("obj", "LinearLinkageEqualityComparer: Cannot compute hash value of null."); 36 40 unchecked { 37 41 int hash = 17;
Note: See TracChangeset
for help on using the changeset viewer.