Ignore:
Timestamp:
07/06/17 14:42:50 (3 years ago)
Author:
jkarder
Message:

#2730: improved equality comparers

  • got rid of one extra comparison
  • fixed RealVectorEqualityComparer
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationEqualityComparer.cs

    r15067 r15162  
    3030  public class PermutationEqualityComparer : EqualityComparer<Permutation> {
    3131    public override bool Equals(Permutation x, Permutation y) {
    32       if (x == null && y == null) return true;
     32      if (ReferenceEquals(x, y)) return true;
    3333      if (x == null || y == null) return false;
    34       if (ReferenceEquals(x, y)) return true;
    3534      if (x.Length != y.Length) return false;
    3635      if (x.PermutationType != y.PermutationType) return false;
Note: See TracChangeset for help on using the changeset viewer.