Index: branches/histogram/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/QAPPhenotypeAlleleFrequencyAnalyzer.cs
===================================================================
--- branches/histogram/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/QAPPhenotypeAlleleFrequencyAnalyzer.cs	(revision 6194)
+++ branches/histogram/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/QAPPhenotypeAlleleFrequencyAnalyzer.cs	(revision 6194)
@@ -0,0 +1,80 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 HeuristicLab.Analysis;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.QuadraticAssignment {
+  /// <summary>
+  /// An operator for analyzing the frequency of alleles in solutions of Quadratic Assignment Problems.
+  /// </summary>
+  [Item("QAPPhenotypeAlleleFrequencyAnalyzer", "An operator for analyzing the frequency of alleles in solutions of Quadratic Assignment Problems.")]
+  [StorableClass]
+  public sealed class QAPPhenotypeAlleleFrequencyAnalyzer : AlleleFrequencyAnalyzer<Permutation> {
+    public LookupParameter<DoubleMatrix> WeightsParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Weights"]; }
+    }
+    public LookupParameter<DoubleMatrix> DistancesParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Distances"]; }
+    }
+
+    [StorableConstructor]
+    private QAPPhenotypeAlleleFrequencyAnalyzer(bool deserializing) : base(deserializing) { }
+    private QAPPhenotypeAlleleFrequencyAnalyzer(QAPPhenotypeAlleleFrequencyAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public QAPPhenotypeAlleleFrequencyAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The matrix contains the weights between the facilities."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The matrix which contains the distances between the locations."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new QAPPhenotypeAlleleFrequencyAnalyzer(this, cloner);
+    }
+
+    protected override Allele[] CalculateAlleles(Permutation solution) {
+      Allele[] alleles = new Allele[solution.Length * solution.Length];
+      DoubleMatrix weights = WeightsParameter.ActualValue;
+      DoubleMatrix distances = DistancesParameter.ActualValue;
+      int source, target;
+      Dictionary<string, int> alleleCount = new Dictionary<string, int>();
+
+      for (int i = 0; i < solution.Length; i++) {
+        source = i;
+        target = solution[i];
+        for (int j = 0; j < solution.Length; j++) {
+          string allele = weights[source, j].ToString("0.00") + "->" + distances[target, solution[j]].ToString("0.00");
+          int count = 1;
+          if (alleleCount.ContainsKey(allele)) count = alleleCount[allele] + 1;
+          alleleCount[allele] = count;
+          alleles[i * solution.Length + j] = new Allele(allele + "/" + count.ToString(), weights[source, j] * distances[target, solution[j]]);
+        }
+      }
+
+      return alleles;
+    }
+  }
+}
Index: branches/histogram/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj
===================================================================
--- branches/histogram/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj	(revision 6115)
+++ branches/histogram/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj	(revision 6194)
@@ -109,4 +109,5 @@
   <ItemGroup>
     <Compile Include="Analyzers\BestQAPSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\QAPPhenotypeAlleleFrequencyAnalyzer.cs" />
     <Compile Include="Analyzers\QAPAlleleFrequencyAnalyzer.cs" />
     <Compile Include="Analyzers\QAPPopulationDiversityAnalyzer.cs" />
