Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorEqualityComparer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorEqualityComparer.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorEqualityComparer.cs	(revision 15067)
@@ -19,14 +19,23 @@
  */
 #endregion
- 
+
+using System;
 using System.Collections.Generic;
-using System.Linq;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Encodings.BinaryVectorEncoding {
+  [NonDiscoverableType]
   public class BinaryVectorEqualityComparer : EqualityComparer<BinaryVector> {
-    public override bool Equals(BinaryVector first, BinaryVector second) {
-      return first.SequenceEqual(second);
+    public override bool Equals(BinaryVector x, BinaryVector y) {
+      if (x == null && y == null) return true;
+      if (x == null || y == null) return false;
+      if (ReferenceEquals(x, y)) return true;
+      if (x.Length != y.Length) return false;
+      for (var i = 0; i < x.Length; i++)
+        if (x[i] != y[i]) return false;
+      return true;
     }
     public override int GetHashCode(BinaryVector obj) {
+      if (obj == null) throw new ArgumentNullException("obj", "BinaryVectorEqualityComparer: Cannot compute hash value of null.");
       unchecked {
         int hash = 17;
Index: /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15067)
@@ -45,8 +45,10 @@
     public static double CalculateSimilarity(BinaryVector left, BinaryVector right) {
       if (left == null || right == null)
-        throw new ArgumentException("Cannot calculate similarity because one or both of the provided scopes is null.");
+        throw new ArgumentException("Cannot calculate similarity because one or both of the provided solutions is null.");
       if (left.Length != right.Length)
         throw new ArgumentException("Cannot calculate similarity because the provided solutions have different lengths.");
-      if (left == right) return 1.0;
+      if (left.Length == 0)
+        throw new ArgumentException("Cannot calculate similarity because solutions are of length 0.");
+      if (ReferenceEquals(left, right)) return 1.0;
 
       double similarity = 0.0;
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/HeuristicLab.Encodings.IntegerVectorEncoding-3.3.csproj	(revision 15067)
@@ -147,4 +147,5 @@
     <Compile Include="Manipulators\RoundedNormalAllPositionsManipulator.cs" />
     <Compile Include="Manipulators\SelfAdaptiveRoundedNormalAllPositionsManipulator.cs" />
+    <Compile Include="SimilarityCalculators\EuclideanSimilarityCalculator.cs" />
     <Compile Include="SimilarityCalculators\HammingSimilarityCalculator.cs" />
     <Compile Include="StrategyParameters\StdDevStrategyVectorCreator.cs" />
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorEqualityComparer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorEqualityComparer.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorEqualityComparer.cs	(revision 15067)
@@ -20,11 +20,15 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Encodings.IntegerVectorEncoding {
+  [NonDiscoverableType]
   public class IntegerVectorEqualityComparer : EqualityComparer<IntegerVector> {
     public override bool Equals(IntegerVector x, IntegerVector y) {
       if (x == null && y == null) return true;
       if (x == null || y == null) return false;
+      if (ReferenceEquals(x, y)) return true;
       if (x.Length != y.Length) return false;
       for (var i = 0; i < x.Length; i++)
@@ -34,4 +38,5 @@
 
     public override int GetHashCode(IntegerVector obj) {
+      if (obj == null) throw new ArgumentNullException("obj", "IntegerVectorEqualityComparer: Cannot compute hash value of null.");
       unchecked {
         int hash = 17;
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/SimilarityCalculators/EuclideanSimilarityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/SimilarityCalculators/EuclideanSimilarityCalculator.cs	(revision 15067)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/SimilarityCalculators/EuclideanSimilarityCalculator.cs	(revision 15067)
@@ -0,0 +1,87 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.IntegerVectorEncoding {
+  [Item("Euclidean Similarity Calculator for IntegerVector", "Calculates the solution similarity based on the Euclidean distance and a transformation into (0;1] between two integer vectors.")]
+  [StorableClass]
+  public sealed class EuclideanSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+    protected override bool IsCommutative {
+      get { return true; }
+    }
+
+    [Storable]
+    private double scaling;
+    /// <summary>
+    /// The higher the scaling, the higher the similarity score for solutions of larger Euclidean distance.
+    /// A value of 1 means no scaling is applied. The function for squashing the numbers into (0;1] is
+    /// 1 / (1 + x / scaling) where x is the Euclidean distance.
+    /// </summary>
+    public double Scaling {
+      get { return scaling; }
+      set { scaling = value; }
+    }
+
+    [StorableConstructor]
+    private EuclideanSimilarityCalculator(bool deserializing) : base(deserializing) { }
+    private EuclideanSimilarityCalculator(EuclideanSimilarityCalculator original, Cloner cloner)
+      : base(original, cloner) {
+      scaling = original.scaling;
+    }
+    public EuclideanSimilarityCalculator() {
+      scaling = 1;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EuclideanSimilarityCalculator(this, cloner);
+    }
+
+    public static double CalculateSimilarity(IntegerVector left, IntegerVector right, double scaling = 1.0) {
+      if (left == null || right == null)
+        throw new ArgumentException("Cannot calculate similarity because one or both of the provided solutions is null.");
+      if (left.Length != right.Length)
+        throw new ArgumentException("Cannot calculate similarity because the provided solutions have different lengths.");
+      if (left.Length == 0)
+        throw new ArgumentException("Cannot calculate similarity because solutions are of length 0.");
+      if (scaling <= 0)
+        throw new ArgumentException("Cannot choose a 0 or negative scaling value.");
+      if (ReferenceEquals(left, right)) return 1.0;
+
+      var distance = 0.0;
+      for (int i = 0; i < left.Length; i++)
+        distance += (left[i] - right[i]) * (left[i] - right[i]);
+      return 1.0 / (1.0 + Math.Sqrt(distance) / scaling);
+
+    }
+
+    public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) {
+      var left = leftSolution.Variables[SolutionVariableName].Value as IntegerVector;
+      var right = rightSolution.Variables[SolutionVariableName].Value as IntegerVector;
+
+      return CalculateSimilarity(left, right, Scaling);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15067)
@@ -45,8 +45,10 @@
     public static double CalculateSimilarity(IntegerVector left, IntegerVector right) {
       if (left == null || right == null)
-        throw new ArgumentException("Cannot calculate similarity because one or both of the provided scopes is null.");
+        throw new ArgumentException("Cannot calculate similarity because one or both of the provided solutions is null.");
       if (left.Length != right.Length)
         throw new ArgumentException("Cannot calculate similarity because the provided solutions have different lengths.");
-      if (left == right) return 1.0;
+      if (left.Length == 0)
+        throw new ArgumentException("Cannot calculate similarity because solutions are of length 0.");
+      if (ReferenceEquals(left, right)) return 1.0;
 
       double similarity = 0.0;
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/LinearLinkageEqualityComparer.cs	(revision 15067)
@@ -20,11 +20,15 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Encodings.LinearLinkageEncoding {
+  [NonDiscoverableType]
   public class LinearLinkageEqualityComparer : EqualityComparer<LinearLinkage> {
     public override bool Equals(LinearLinkage x, LinearLinkage y) {
       if (x == null && y == null) return true;
       if (x == null || y == null) return false;
+      if (ReferenceEquals(x, y)) return true;
       if (x.Length != y.Length) return false;
       for (var i = 0; i < x.Length; i++)
@@ -34,4 +38,5 @@
 
     public override int GetHashCode(LinearLinkage obj) {
+      if (obj == null) throw new ArgumentNullException("obj", "LinearLinkageEqualityComparer: Cannot compute hash value of null.");
       unchecked {
         int hash = 17;
Index: /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/SimilarityCalculators/HammingSimilarityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.LinearLinkageEncoding/3.4/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15067)
@@ -30,13 +30,10 @@
   [StorableClass]
   public sealed class HammingSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
-
-    protected override bool IsCommutative {
-      get { return true; }
-    }
+    protected override bool IsCommutative { get { return true; } }
 
     [StorableConstructor]
     private HammingSimilarityCalculator(bool deserializing) : base(deserializing) { }
     private HammingSimilarityCalculator(HammingSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
-    public HammingSimilarityCalculator() { }
+    public HammingSimilarityCalculator() : base() { }
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -45,5 +42,12 @@
 
     public static double CalculateSimilarity(LinearLinkage left, LinearLinkage right) {
-      if (left.Length != right.Length) throw new ArgumentException("Comparing encodings of unequal length");
+      if (left == null || right == null)
+        throw new ArgumentException("Cannot calculate similarity because one or both of the provided solutions is null.");
+      if (left.Length != right.Length)
+        throw new ArgumentException("Cannot calculate similarity because the provided solutions have different lengths.");
+      if (left.Length == 0)
+        throw new ArgumentException("Cannot calculate similarity because solutions are of length 0.");
+      if (ReferenceEquals(left, right)) return 1.0;
+
       var similarity = 0;
       for (var i = 0; i < left.Length; i++) {
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationEqualityComparer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationEqualityComparer.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationEqualityComparer.cs	(revision 15067)
@@ -30,6 +30,9 @@
   public class PermutationEqualityComparer : EqualityComparer<Permutation> {
     public override bool Equals(Permutation x, Permutation y) {
+      if (x == null && y == null) return true;
+      if (x == null || y == null) return false;
+      if (ReferenceEquals(x, y)) return true;
+      if (x.Length != y.Length) return false;
       if (x.PermutationType != y.PermutationType) return false;
-      if (x.Length != y.Length) return false;
       switch (x.PermutationType) {
         case PermutationTypes.Absolute:
@@ -67,5 +70,5 @@
 
     public override int GetHashCode(Permutation obj) {
-      if (obj == null) return 0;
+      if (obj == null) throw new ArgumentNullException("obj", "PermutationEqualityComparer: Cannot compute hash value of null.");
       return GenerateHashString(obj).GetHashCode();
     }
Index: /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15067)
@@ -24,10 +24,13 @@
 using HeuristicLab.Core;
 using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Encodings.PermutationEncoding {
   [Item("Hamming Similarity Calculator for Permutation", "An operator that performs similarity calculation between two permutation-encoded solutions.")]
+  [StorableClass]
   public sealed class HammingSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
     protected override bool IsCommutative { get { return true; } }
 
+    [StorableConstructor]
     private HammingSimilarityCalculator(bool deserializing) : base(deserializing) { }
     private HammingSimilarityCalculator(HammingSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
@@ -40,10 +43,12 @@
     public static double CalculateSimilarity(Permutation left, Permutation right) {
       if (left == null || right == null)
-        throw new ArgumentException("Cannot calculate similarity because one of the provided solutions or both are null.");
+        throw new ArgumentException("Cannot calculate similarity because one or both of the provided solutions is null.");
       if (left.PermutationType != right.PermutationType)
-        throw new ArgumentException("Cannot calculate similarity because the provided solutions have different types.");
+        throw new ArgumentException("Cannot calculate similarity because the provided solutions have different permutation types.");
       if (left.Length != right.Length)
         throw new ArgumentException("Cannot calculate similarity because the provided solutions have different lengths.");
-      if (object.ReferenceEquals(left, right)) return 1.0;
+      if (left.Length == 0)
+        throw new ArgumentException("Cannot calculate similarity because solutions are of length 0.");
+      if (ReferenceEquals(left, right)) return 1.0;
 
       switch (left.PermutationType) {
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj	(revision 15067)
@@ -183,4 +183,5 @@
     <Compile Include="ReflectiveBoundsChecker.cs" />
     <Compile Include="ShakingOperators\RealVectorShakingOperator.cs" />
+    <Compile Include="SimilarityCalculators\EuclideanSimilarityCalculator.cs" />
     <Compile Include="SimilarityCalculators\HammingSimilarityCalculator.cs" />
     <Compile Include="StrategyParameters\StdDevStrategyVectorCreator.cs" />
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorEqualityComparer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorEqualityComparer.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorEqualityComparer.cs	(revision 15067)
@@ -20,11 +20,15 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Encodings.RealVectorEncoding {
+  [NonDiscoverableType]
   public class RealVectorEqualityComparer : EqualityComparer<RealVector> {
     public override bool Equals(RealVector x, RealVector y) {
       if (x == null && y == null) return true;
       if (x == null || y == null) return false;
+      if (ReferenceEquals(x, y)) return true;
       if (x.Length != y.Length) return false;
       for (var i = 0; i < x.Length; i++)
@@ -34,4 +38,5 @@
 
     public override int GetHashCode(RealVector obj) {
+      if (obj == null) throw new ArgumentNullException("obj", "RealVectorEqualityComparer: Cannot compute hash value of null.");
       unchecked {
         int hash = 17;
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/SimilarityCalculators/EuclideanSimilarityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/SimilarityCalculators/EuclideanSimilarityCalculator.cs	(revision 15067)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/SimilarityCalculators/EuclideanSimilarityCalculator.cs	(revision 15067)
@@ -0,0 +1,87 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization.Operators;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.RealVectorEncoding {
+  [Item("Euclidean Similarity Calculator for RealVector", "Calculates the solution similarity based on the Euclidean distance and a transformation into (0;1] between two real vectors.")]
+  [StorableClass]
+  public sealed class EuclideanSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+    protected override bool IsCommutative {
+      get { return true; }
+    }
+
+    [Storable]
+    private double scaling;
+    /// <summary>
+    /// The higher the scaling, the higher the similarity score for solutions of larger Euclidean distance.
+    /// A value of 1 means no scaling is applied. The function for squashing the numbers into (0;1] is
+    /// 1 / (1 + x / scaling) where x is the Euclidean distance.
+    /// </summary>
+    public double Scaling {
+      get { return scaling; }
+      set { scaling = value; }
+    }
+
+    [StorableConstructor]
+    private EuclideanSimilarityCalculator(bool deserializing) : base(deserializing) { }
+    private EuclideanSimilarityCalculator(EuclideanSimilarityCalculator original, Cloner cloner)
+      : base(original, cloner) {
+      scaling = original.scaling;
+    }
+    public EuclideanSimilarityCalculator() {
+      scaling = 1;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new EuclideanSimilarityCalculator(this, cloner);
+    }
+
+    public static double CalculateSimilarity(RealVector left, RealVector right, double scaling = 1.0) {
+      if (left == null || right == null)
+        throw new ArgumentException("Cannot calculate similarity because one or both of the provided solutions is null.");
+      if (left.Length != right.Length)
+        throw new ArgumentException("Cannot calculate similarity because the provided solutions have different lengths.");
+      if (left.Length == 0)
+        throw new ArgumentException("Cannot calculate similarity because solutions are of length 0.");
+      if (scaling <= 0)
+        throw new ArgumentException("Cannot choose a 0 or negative scaling value.");
+      if (ReferenceEquals(left, right)) return 1.0;
+
+      var distance = 0.0;
+      for (int i = 0; i < left.Length; i++)
+        distance += (left[i] - right[i]) * (left[i] - right[i]);
+      return 1.0 / (1.0 + Math.Sqrt(distance) / scaling);
+
+    }
+
+    public override double CalculateSolutionSimilarity(IScope leftSolution, IScope rightSolution) {
+      var left = leftSolution.Variables[SolutionVariableName].Value as RealVector;
+      var right = rightSolution.Variables[SolutionVariableName].Value as RealVector;
+
+      return CalculateSimilarity(left, right, Scaling);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15066)
+++ /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/SimilarityCalculators/HammingSimilarityCalculator.cs	(revision 15067)
@@ -45,8 +45,10 @@
     public static double CalculateSimilarity(RealVector left, RealVector right) {
       if (left == null || right == null)
-        throw new ArgumentException("Cannot calculate similarity because one or both of the provided scopes is null.");
+        throw new ArgumentException("Cannot calculate similarity because one or both of the provided solutions is null.");
       if (left.Length != right.Length)
         throw new ArgumentException("Cannot calculate similarity because the provided solutions have different lengths.");
-      if (left == right) return 1.0;
+      if (left.Length == 0)
+        throw new ArgumentException("Cannot calculate similarity because solutions are of length 0.");
+      if (ReferenceEquals(left, right)) return 1.0;
 
       double similarity = 0.0;
