Index: trunk/sources/HeuristicLab.Optimization.Operators/3.3/NoSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Operators/3.3/NoSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Optimization.Operators/3.3/NoSimilarityCalculator.cs	(revision 12070)
@@ -32,4 +32,6 @@
   [Item("NoSimilarityCalculator", "An item that performs similarity calculation between two solutions. The item always considers two solutions to be distinct.")]
   public sealed class NoSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+    protected override bool IsCommutative { get { return true; } }
+
     private NoSimilarityCalculator(bool deserializing) : base(deserializing) { }
     private NoSimilarityCalculator(NoSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
Index: trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualitySimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualitySimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Optimization.Operators/3.3/QualitySimilarityCalculator.cs	(revision 12070)
@@ -34,4 +34,6 @@
   [Item("QualitySimilarityCalculator", "An item that performs similarity calculation between two solutions. The item only considers the qualities of the two solutions.")]
   public sealed class QualitySimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+    protected override bool IsCommutative { get { return true; } }
+
     private QualitySimilarityCalculator(bool deserializing) : base(deserializing) { }
     private QualitySimilarityCalculator(QualitySimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
Index: trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Optimization.Operators/3.3/SolutionSimilarityCalculator.cs	(revision 12070)
@@ -33,4 +33,6 @@
   [StorableClass]
   public abstract class SolutionSimilarityCalculator : Item, ISolutionSimilarityCalculator {
+    protected abstract bool IsCommutative { get; }
+
     [StorableConstructor]
     protected SolutionSimilarityCalculator(bool deserializing) : base(deserializing) { }
@@ -71,7 +73,17 @@
       for (int i = 0; i < individuals.Count; i++) similarityMatrix[i] = new double[individuals.Count];
 
-      for (int i = 0; i < individuals.Count; i++) {
-        for (int j = i; j < individuals.Count; j++) {
-          similarityMatrix[i][j] = similarityMatrix[j][i] = CalculateSolutionSimilarity(individuals[i], individuals[j]);
+      if (IsCommutative) {
+        for (int i = 0; i < individuals.Count; i++) {
+          for (int j = i; j < individuals.Count; j++) {
+            similarityMatrix[i][j] = similarityMatrix[j][i] = CalculateSolutionSimilarity(individuals[i], individuals[j]);
+          }
+        }
+      } else {
+        for (int i = 0; i < individuals.Count; i++) {
+          for (int j = i; j < individuals.Count; j++) {
+            similarityMatrix[i][j] = CalculateSolutionSimilarity(individuals[i], individuals[j]);
+            if (i == j) continue;
+            similarityMatrix[j][i] = CalculateSolutionSimilarity(individuals[j], individuals[i]);
+          }
         }
       }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs	(revision 12070)
@@ -36,4 +36,7 @@
   public class SymbolicExpressionTreeBottomUpSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
     private readonly HashSet<string> commutativeSymbols = new HashSet<string> { "Addition", "Multiplication", "Average", "And", "Or", "Xor" };
+
+    protected override bool IsCommutative { get { return true; } }
+
     public SymbolicExpressionTreeBottomUpSimilarityCalculator() { }
 
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs	(revision 12070)
@@ -31,4 +31,6 @@
   [Item("SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator", "A similarity calculator based on the size of the maximum common subtree between two trees")]
   public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+    protected override bool IsCommutative { get { return true; } }
+
     [Storable]
     private readonly SymbolicExpressionTreeNodeEqualityComparer comparer;
Index: trunk/sources/HeuristicLab.Problems.Knapsack/3.3/SimilarityCalculators/KnapsackSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Knapsack/3.3/SimilarityCalculators/KnapsackSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Problems.Knapsack/3.3/SimilarityCalculators/KnapsackSimilarityCalculator.cs	(revision 12070)
@@ -35,4 +35,6 @@
   [Item("KnapsackSimilarityCalculator", "An operator that performs similarity calculation between two knapsack solutions. The operator calculates the similarity based on the number of elements the two solutions have in common.")]
   public sealed class KnapsackSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+    protected override bool IsCommutative { get { return true; } }
+
     private KnapsackSimilarityCalculator(bool deserializing) : base(deserializing) { }
     private KnapsackSimilarityCalculator(KnapsackSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
Index: trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPSimilarityCalculator.cs	(revision 12070)
@@ -35,4 +35,6 @@
   [Item("QAPSimilarityCalculator", "An operator that performs similarity calculation between two quadratic assignment solutions. The operator calculates the similarity based on the number of edges the two solutions have in common.")]
   public sealed class QAPSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+    protected override bool IsCommutative { get { return true; } }
+
     private QAPSimilarityCalculator(bool deserializing) : base(deserializing) { }
     private QAPSimilarityCalculator(QAPSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
Index: trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators/SingleObjectiveTestFunctionSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators/SingleObjectiveTestFunctionSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/SimilarityCalculators/SingleObjectiveTestFunctionSimilarityCalculator.cs	(revision 12070)
@@ -38,8 +38,8 @@
   [StorableClass]
   public sealed class SingleObjectiveTestFunctionSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
-    #region Properties
+    protected override bool IsCommutative { get { return true; } }
+
     [Storable]
     public DoubleMatrix Bounds { get; set; }
-    #endregion
 
     [StorableConstructor]
Index: trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/SimilarityCalculators/TSPSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/SimilarityCalculators/TSPSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/SimilarityCalculators/TSPSimilarityCalculator.cs	(revision 12070)
@@ -35,4 +35,6 @@
   [Item("TSPSimilarityCalculator", "An operator that performs similarity calculation between two traveling salesman solutions. The operator calculates the similarity based on the number of edges the two solutions have in common.")]
   public sealed class TSPSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+    protected override bool IsCommutative { get { return true; } }
+
     private TSPSimilarityCalculator(bool deserializing) : base(deserializing) { }
     private TSPSimilarityCalculator(TSPSimilarityCalculator original, Cloner cloner) : base(original, cloner) { }
Index: trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/SimilarityCalculators/VRPSimilarityCalculator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/SimilarityCalculators/VRPSimilarityCalculator.cs	(revision 12069)
+++ trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/SimilarityCalculators/VRPSimilarityCalculator.cs	(revision 12070)
@@ -40,8 +40,8 @@
   [StorableClass]
   public sealed class VRPSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
-    #region Properties
+    protected override bool IsCommutative { get { return true; } }
+
     [Storable]
     public IVRPProblemInstance ProblemInstance { get; set; }
-    #endregion
 
     private VRPSimilarityCalculator(bool deserializing) : base(deserializing) { }
