Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj	(revision 12086)
@@ -186,5 +186,5 @@
     <Compile Include="ModelCreators\NormalDistributedThresholdsModelCreator.cs" />
     <Compile Include="MultiObjective\SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer.cs" />
-    <Compile Include="SingleObjective\SymbolicClassificationPhenotypicDiversityAnalyzer.cs" />
+    <Compile Include="SymbolicClassificationPhenotypicDiversityAnalyzer.cs" />
     <Compile Include="SymbolicClassificationPruningAnalyzer.cs" />
     <Compile Include="SymbolicClassificationSolutionImpactValuesCalculator.cs" />
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectiveProblem.cs	(revision 12086)
@@ -23,4 +23,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -105,4 +106,8 @@
       Operators.Add(new SymbolicClassificationMultiObjectiveTrainingBestSolutionAnalyzer());
       Operators.Add(new SymbolicClassificationMultiObjectiveValidationBestSolutionAnalyzer());
+      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
+      Operators.Add(new SymbolicClassificationPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()) {
+        DiversityResultName = "Phenotypic Diversity"
+      });
       ParameterizeOperators();
     }
@@ -135,4 +140,15 @@
           op.ModelCreatorParameter.ActualName = ModelCreatorParameter.Name;
       }
+
+      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
+        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.QualityVariableName = Evaluator.QualitiesParameter.ActualName;
+
+        if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) {
+          var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op;
+          phenotypicSimilarityCalculator.ProblemData = ProblemData;
+          phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter;
+        }
+      }
     }
   }
Index: anches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationPhenotypicDiversityAnalyzer.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationPhenotypicDiversityAnalyzer.cs	(revision 12085)
+++ 	(revision )
@@ -1,138 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 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.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
-  [Item("SymbolicClassificationPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")]
-  [StorableClass]
-  public class SymbolicClassificationPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer {
-    #region parameter names
-    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
-    private const string EvaluatedValuesParameterName = "EstimatedValues";
-    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
-    private const string ProblemDataParameterName = "ProblemData";
-    private const string ModelCreatorParameterName = "ModelCreator";
-    private const string EstimationLimitsParameterName = "EstimationLimits";
-    private const string UseClassValuesParameterName = "UseClassValues";
-    #endregion
-
-    #region parameter properties
-    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
-      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
-    }
-    private IScopeTreeLookupParameter<DoubleArray> EvaluatedValuesParameter {
-      get { return (IScopeTreeLookupParameter<DoubleArray>)Parameters[EvaluatedValuesParameterName]; }
-    }
-    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
-      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
-    }
-    public ILookupParameter<ISymbolicDiscriminantFunctionClassificationModelCreator> ModelCreatorParameter {
-      get { return (ILookupParameter<ISymbolicDiscriminantFunctionClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
-    }
-    public IValueLookupParameter<IClassificationProblemData> ProblemDataParameter {
-      get { return (IValueLookupParameter<IClassificationProblemData>)Parameters[ProblemDataParameterName]; }
-    }
-    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
-      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
-    }
-    public IFixedValueParameter<BoolValue> UseClassValuesParameter {
-      get { return (IFixedValueParameter<BoolValue>)Parameters[UseClassValuesParameterName]; }
-    }
-    #endregion
-
-    #region properties
-    public bool UseClassValues {
-      get { return UseClassValuesParameter.Value.Value; }
-      set { UseClassValuesParameter.Value.Value = value; }
-    }
-    #endregion
-
-    public SymbolicClassificationPhenotypicDiversityAnalyzer(IEnumerable<ISingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators)
-      : base(validSimilarityCalculators) {
-      #region add parameters
-      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees."));
-      Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>(EvaluatedValuesParameterName, "Intermediate estimated values to be saved in the scopes."));
-      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
-      Parameters.Add(new ValueLookupParameter<IClassificationProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
-      Parameters.Add(new LookupParameter<ISymbolicDiscriminantFunctionClassificationModelCreator>(ModelCreatorParameterName, "The model creator for creating discriminant function classification models."));
-      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
-      Parameters.Add(new FixedValueParameter<BoolValue>(UseClassValuesParameterName, "Specifies whether the raw estimated values of the tree or the corresponding class values should be used for similarity calculation.", new BoolValue(false)));
-      #endregion
-
-      UpdateCounterParameter.ActualName = "PhenotypicDiversityAnalyzerUpdateCounter";
-    }
-
-    [StorableConstructor]
-    protected SymbolicClassificationPhenotypicDiversityAnalyzer(bool deserializing)
-      : base(deserializing) {
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SymbolicClassificationPhenotypicDiversityAnalyzer(this, cloner);
-    }
-
-    private SymbolicClassificationPhenotypicDiversityAnalyzer(SymbolicClassificationPhenotypicDiversityAnalyzer original, Cloner cloner)
-      : base(original, cloner) {
-    }
-
-    public override IOperation Apply() {
-      int updateInterval = UpdateIntervalParameter.Value.Value;
-      IntValue updateCounter = UpdateCounterParameter.ActualValue;
-
-      if (updateCounter == null) {
-        updateCounter = new IntValue(updateInterval);
-        UpdateCounterParameter.ActualValue = updateCounter;
-      }
-
-      if (updateCounter.Value == updateInterval) {
-        var trees = SymbolicExpressionTreeParameter.ActualValue;
-        var interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
-        var problemData = ProblemDataParameter.ActualValue;
-        var ds = ProblemDataParameter.ActualValue.Dataset;
-        var rows = ProblemDataParameter.ActualValue.TrainingIndices;
-        var modelCreator = ModelCreatorParameter.ActualValue;
-        var estimationLimits = EstimationLimitsParameter.ActualValue;
-        var evaluatedValues = new ItemArray<DoubleArray>(trees.Length);
-        for (int i = 0; i < trees.Length; ++i) {
-          var model =
-            (IDiscriminantFunctionClassificationModel)
-              modelCreator.CreateSymbolicDiscriminantFunctionClassificationModel(trees[i], interpreter,
-                estimationLimits.Lower, estimationLimits.Upper);
-          model.RecalculateModelParameters(problemData, rows);
-          var values = UseClassValues ? model.GetEstimatedClassValues(ds, rows) : model.GetEstimatedValues(ds, rows);
-          evaluatedValues[i] = new DoubleArray(values.ToArray());
-        }
-        EvaluatedValuesParameter.ActualValue = evaluatedValues;
-      }
-      return base.Apply();
-    }
-  }
-}
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs	(revision 12086)
@@ -149,5 +149,5 @@
       }
 
-      foreach (var op in Operators.OfType<ISingleObjectiveSolutionSimilarityCalculator>()) {
+      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
         op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
         op.QualityVariableName = Evaluator.QualityParameter.ActualName;
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPhenotypicDiversityAnalyzer.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPhenotypicDiversityAnalyzer.cs	(revision 12086)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationPhenotypicDiversityAnalyzer.cs	(revision 12086)
@@ -0,0 +1,135 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
+  [Item("SymbolicClassificationPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")]
+  [StorableClass]
+  public class SymbolicClassificationPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer {
+    #region parameter names
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string EvaluatedValuesParameterName = "EstimatedValues";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string ModelCreatorParameterName = "ModelCreator";
+    private const string EstimationLimitsParameterName = "EstimationLimits";
+    private const string UseClassValuesParameterName = "UseClassValues";
+    #endregion
+
+    #region parameter properties
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    private IScopeTreeLookupParameter<DoubleArray> EvaluatedValuesParameter {
+      get { return (IScopeTreeLookupParameter<DoubleArray>)Parameters[EvaluatedValuesParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDiscriminantFunctionClassificationModelCreator> ModelCreatorParameter {
+      get { return (ILookupParameter<ISymbolicDiscriminantFunctionClassificationModelCreator>)Parameters[ModelCreatorParameterName]; }
+    }
+    public IValueLookupParameter<IClassificationProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<IClassificationProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
+      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+    }
+    public IFixedValueParameter<BoolValue> UseClassValuesParameter {
+      get { return (IFixedValueParameter<BoolValue>)Parameters[UseClassValuesParameterName]; }
+    }
+    #endregion
+
+    #region properties
+    public bool UseClassValues {
+      get { return UseClassValuesParameter.Value.Value; }
+      set { UseClassValuesParameter.Value.Value = value; }
+    }
+    #endregion
+
+    public SymbolicClassificationPhenotypicDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators)
+      : base(validSimilarityCalculators) {
+      #region add parameters
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>(EvaluatedValuesParameterName, "Intermediate estimated values to be saved in the scopes."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
+      Parameters.Add(new ValueLookupParameter<IClassificationProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new LookupParameter<ISymbolicDiscriminantFunctionClassificationModelCreator>(ModelCreatorParameterName, "The model creator for creating discriminant function classification models."));
+      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
+      Parameters.Add(new FixedValueParameter<BoolValue>(UseClassValuesParameterName, "Specifies whether the raw estimated values of the tree or the corresponding class values should be used for similarity calculation.", new BoolValue(false)));
+      #endregion
+
+      UpdateCounterParameter.ActualName = "PhenotypicDiversityAnalyzerUpdateCounter";
+    }
+
+    [StorableConstructor]
+    protected SymbolicClassificationPhenotypicDiversityAnalyzer(bool deserializing)
+      : base(deserializing) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicClassificationPhenotypicDiversityAnalyzer(this, cloner);
+    }
+
+    private SymbolicClassificationPhenotypicDiversityAnalyzer(SymbolicClassificationPhenotypicDiversityAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IOperation Apply() {
+      int updateInterval = UpdateIntervalParameter.Value.Value;
+      IntValue updateCounter = UpdateCounterParameter.ActualValue;
+
+      if (updateCounter == null) {
+        updateCounter = new IntValue(updateInterval);
+        UpdateCounterParameter.ActualValue = updateCounter;
+      }
+
+      if (updateCounter.Value == updateInterval) {
+        var trees = SymbolicExpressionTreeParameter.ActualValue;
+        var interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
+        var problemData = ProblemDataParameter.ActualValue;
+        var ds = ProblemDataParameter.ActualValue.Dataset;
+        var rows = ProblemDataParameter.ActualValue.TrainingIndices;
+        var modelCreator = ModelCreatorParameter.ActualValue;
+        var estimationLimits = EstimationLimitsParameter.ActualValue;
+        var evaluatedValues = new ItemArray<DoubleArray>(trees.Length);
+        for (int i = 0; i < trees.Length; ++i) {
+          var model = (IDiscriminantFunctionClassificationModel)modelCreator.CreateSymbolicDiscriminantFunctionClassificationModel(trees[i], interpreter, estimationLimits.Lower, estimationLimits.Upper);
+          model.RecalculateModelParameters(problemData, rows);
+          var values = UseClassValues ? model.GetEstimatedClassValues(ds, rows) : model.GetEstimatedValues(ds, rows);
+          evaluatedValues[i] = new DoubleArray(values.ToArray());
+        }
+        EvaluatedValuesParameter.ActualValue = evaluatedValues;
+      }
+      return base.Apply();
+    }
+  }
+}
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 12086)
@@ -182,5 +182,5 @@
     <Compile Include="SingleObjective\ConstantOptimizationAnalyzer.cs" />
     <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />
-    <Compile Include="SingleObjective\SymbolicRegressionPhenotypicDiversityAnalyzer.cs" />
+    <Compile Include="SymbolicRegressionPhenotypicDiversityAnalyzer.cs" />
     <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" />
     <Compile Include="SymbolicRegressionPruningAnalyzer.cs" />
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveProblem.cs	(revision 12086)
@@ -24,4 +24,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -93,4 +94,8 @@
       Operators.Add(new SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer());
       Operators.Add(new SymbolicRegressionMultiObjectiveValidationBestSolutionAnalyzer());
+      Operators.Add(new SymbolicExpressionTreePhenotypicSimilarityCalculator());
+      Operators.Add(new SymbolicRegressionPhenotypicDiversityAnalyzer(Operators.OfType<SymbolicExpressionTreePhenotypicSimilarityCalculator>()) {
+        DiversityResultName = "Phenotypic Diversity"
+      });
       ParameterizeOperators();
     }
@@ -122,4 +127,15 @@
         }
       }
+
+      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
+        op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.QualityVariableName = Evaluator.QualitiesParameter.ActualName;
+
+        if (op is SymbolicExpressionTreePhenotypicSimilarityCalculator) {
+          var phenotypicSimilarityCalculator = (SymbolicExpressionTreePhenotypicSimilarityCalculator)op;
+          phenotypicSimilarityCalculator.ProblemData = ProblemData;
+          phenotypicSimilarityCalculator.Interpreter = SymbolicExpressionTreeInterpreter;
+        }
+      }
     }
   }
Index: anches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionPhenotypicDiversityAnalyzer.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionPhenotypicDiversityAnalyzer.cs	(revision 12085)
+++ 	(revision )
@@ -1,110 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 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.Collections.Generic;
-using System.Linq;
-using HeuristicLab.Analysis;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
-  [Item("SymbolicRegressionPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")]
-  [StorableClass]
-  public class SymbolicRegressionPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer {
-    #region parameter names
-    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
-    private const string EvaluatedValuesParameterName = "EstimatedValues";
-    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
-    private const string ProblemDataParameterName = "ProblemData";
-    private const string EstimationLimitsParameterName = "EstimationLimits";
-    #endregion
-
-    #region parameter properties
-    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
-      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
-    }
-    private IScopeTreeLookupParameter<DoubleArray> EvaluatedValuesParameter {
-      get { return (IScopeTreeLookupParameter<DoubleArray>)Parameters[EvaluatedValuesParameterName]; }
-    }
-    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
-      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
-    }
-    public IValueLookupParameter<IRegressionProblemData> ProblemDataParameter {
-      get { return (IValueLookupParameter<IRegressionProblemData>)Parameters[ProblemDataParameterName]; }
-    }
-    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
-      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
-    }
-    #endregion
-
-    public SymbolicRegressionPhenotypicDiversityAnalyzer(IEnumerable<ISingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators)
-      : base(validSimilarityCalculators) {
-      #region add parameters
-      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees."));
-      Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>(EvaluatedValuesParameterName, "Intermediate estimated values to be saved in the scopes."));
-      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
-      Parameters.Add(new ValueLookupParameter<IRegressionProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
-      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
-      #endregion
-
-      UpdateCounterParameter.ActualName = "PhenotypicDiversityAnalyzerUpdateCounter";
-    }
-
-    [StorableConstructor]
-    protected SymbolicRegressionPhenotypicDiversityAnalyzer(bool deserializing)
-      : base(deserializing) {
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SymbolicRegressionPhenotypicDiversityAnalyzer(this, cloner);
-    }
-
-    private SymbolicRegressionPhenotypicDiversityAnalyzer(SymbolicRegressionPhenotypicDiversityAnalyzer original, Cloner cloner)
-      : base(original, cloner) {
-    }
-
-    public override IOperation Apply() {
-      int updateInterval = UpdateIntervalParameter.Value.Value;
-      IntValue updateCounter = UpdateCounterParameter.ActualValue;
-
-      if (updateCounter == null) {
-        updateCounter = new IntValue(updateInterval);
-        UpdateCounterParameter.ActualValue = updateCounter;
-      }
-
-      if (updateCounter.Value == updateInterval) {
-        var trees = SymbolicExpressionTreeParameter.ActualValue;
-        var interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
-        var ds = ProblemDataParameter.ActualValue.Dataset;
-        var rows = ProblemDataParameter.ActualValue.TrainingIndices;
-
-        var evaluatedValues = new ItemArray<DoubleArray>(trees.Select(t => new DoubleArray(interpreter.GetSymbolicExpressionTreeValues(t, ds, rows).ToArray())));
-        EvaluatedValuesParameter.ActualValue = evaluatedValues;
-      }
-      return base.Apply();
-    }
-  }
-}
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionSingleObjectiveProblem.cs	(revision 12086)
@@ -144,5 +144,5 @@
       }
 
-      foreach (var op in Operators.OfType<ISingleObjectiveSolutionSimilarityCalculator>()) {
+      foreach (var op in Operators.OfType<ISolutionSimilarityCalculator>()) {
         op.SolutionVariableName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
         op.QualityVariableName = Evaluator.QualityParameter.ActualName;
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPhenotypicDiversityAnalyzer.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPhenotypicDiversityAnalyzer.cs	(revision 12086)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPhenotypicDiversityAnalyzer.cs	(revision 12086)
@@ -0,0 +1,110 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
+  [Item("SymbolicRegressionPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")]
+  [StorableClass]
+  public class SymbolicRegressionPhenotypicDiversityAnalyzer : PopulationSimilarityAnalyzer {
+    #region parameter names
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string EvaluatedValuesParameterName = "EstimatedValues";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string EstimationLimitsParameterName = "EstimationLimits";
+    #endregion
+
+    #region parameter properties
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    private IScopeTreeLookupParameter<DoubleArray> EvaluatedValuesParameter {
+      get { return (IScopeTreeLookupParameter<DoubleArray>)Parameters[EvaluatedValuesParameterName]; }
+    }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+    }
+    public IValueLookupParameter<IRegressionProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<IRegressionProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
+      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
+    }
+    #endregion
+
+    public SymbolicRegressionPhenotypicDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators)
+      : base(validSimilarityCalculators) {
+      #region add parameters
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>(EvaluatedValuesParameterName, "Intermediate estimated values to be saved in the scopes."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic data analysis tree."));
+      Parameters.Add(new ValueLookupParameter<IRegressionProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
+      #endregion
+
+      UpdateCounterParameter.ActualName = "PhenotypicDiversityAnalyzerUpdateCounter";
+    }
+
+    [StorableConstructor]
+    protected SymbolicRegressionPhenotypicDiversityAnalyzer(bool deserializing)
+      : base(deserializing) {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicRegressionPhenotypicDiversityAnalyzer(this, cloner);
+    }
+
+    private SymbolicRegressionPhenotypicDiversityAnalyzer(SymbolicRegressionPhenotypicDiversityAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public override IOperation Apply() {
+      int updateInterval = UpdateIntervalParameter.Value.Value;
+      IntValue updateCounter = UpdateCounterParameter.ActualValue;
+
+      if (updateCounter == null) {
+        updateCounter = new IntValue(updateInterval);
+        UpdateCounterParameter.ActualValue = updateCounter;
+      }
+
+      if (updateCounter.Value == updateInterval) {
+        var trees = SymbolicExpressionTreeParameter.ActualValue;
+        var interpreter = SymbolicDataAnalysisTreeInterpreterParameter.ActualValue;
+        var ds = ProblemDataParameter.ActualValue.Dataset;
+        var rows = ProblemDataParameter.ActualValue.TrainingIndices;
+
+        var evaluatedValues = new ItemArray<DoubleArray>(trees.Select(t => new DoubleArray(interpreter.GetSymbolicExpressionTreeValues(t, ds, rows).ToArray())));
+        EvaluatedValuesParameter.ActualValue = evaluatedValues;
+      }
+      return base.Apply();
+    }
+  }
+}
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs	(revision 12086)
@@ -42,6 +42,5 @@
     }
 
-    public SymbolicDataAnalysisBottomUpDiversityAnalyzer(
-      IEnumerable<ISingleObjectiveSolutionSimilarityCalculator> validSimilarityCalculators)
+    public SymbolicDataAnalysisBottomUpDiversityAnalyzer(IEnumerable<ISolutionSimilarityCalculator> validSimilarityCalculators)
       : base(validSimilarityCalculators) {
       UpdateCounterParameter.ActualName = "GenotypicDiversityAnalyzerUpdateCounter";
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeBottomUpSimilarityCalculator.cs	(revision 12086)
@@ -34,7 +34,9 @@
   [StorableClass]
   [Item("SymbolicExpressionTreeBottomUpSimilarityCalculator", "A similarity calculator which uses the tree bottom-up distance as a similarity metric.")]
-  public class SymbolicExpressionTreeBottomUpSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+  public class SymbolicExpressionTreeBottomUpSimilarityCalculator : SolutionSimilarityCalculator {
     private readonly HashSet<string> commutativeSymbols = new HashSet<string> { "Addition", "Multiplication", "Average", "And", "Or", "Xor" };
     public SymbolicExpressionTreeBottomUpSimilarityCalculator() { }
+
+    protected override bool IsCommutative { get { return true; } }
 
     [StorableConstructor]
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator.cs	(revision 12086)
@@ -30,5 +30,5 @@
   [StorableClass]
   [Item("SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator", "A similarity calculator based on the size of the maximum common subtree between two trees")]
-  public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+  public class SymbolicExpressionTreeMaxCommonSubtreeSimilarityCalculator : SolutionSimilarityCalculator {
     [Storable]
     private readonly SymbolicExpressionTreeNodeEqualityComparer comparer;
@@ -42,4 +42,6 @@
       set { comparer.MatchConstantValues = value; }
     }
+
+    protected override bool IsCommutative { get { return true; } }
 
     [StorableConstructor]
@@ -85,4 +87,5 @@
     }
 
+
     public static double MaxCommonSubtreeSimilarity(ISymbolicExpressionTree a, ISymbolicExpressionTree b, ISymbolicExpressionTreeNodeSimilarityComparer comparer) {
       int max = 0;
Index: /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
===================================================================
--- /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs	(revision 12085)
+++ /branches/SymbolicExpressionTreeDiversityAnalyzers/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs	(revision 12086)
@@ -31,9 +31,11 @@
   [Item("SymbolicExpressionTreePhenotypicSimilarityCalculator", "An operator that calculates the similarity betweeon two trees based on the correlation of their outputs.")]
   [StorableClass]
-  public class SymbolicExpressionTreePhenotypicSimilarityCalculator : SingleObjectiveSolutionSimilarityCalculator {
+  public class SymbolicExpressionTreePhenotypicSimilarityCalculator : SolutionSimilarityCalculator {
     [Storable]
     public IDataAnalysisProblemData ProblemData { get; set; }
     [Storable]
     public ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get; set; }
+
+    protected override bool IsCommutative { get { return true; } }
 
     [StorableConstructor]
@@ -50,6 +52,5 @@
     }
 
-    public SymbolicExpressionTreePhenotypicSimilarityCalculator() {
-    }
+    public SymbolicExpressionTreePhenotypicSimilarityCalculator() { }
 
     public double CalculateSimilarity(ISymbolicExpressionTree t1, ISymbolicExpressionTree t2) {
