Index: branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalysisDetails.cs
===================================================================
--- branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalysisDetails.cs	(revision 4502)
+++ branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalysisDetails.cs	(revision 4502)
@@ -0,0 +1,68 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.TravelingSalesman {
+
+  /// <summary>
+  /// A class for storing details of population diversity analysis results.
+  /// </summary>
+  [Item("TSPPopulationDiversityAnalysisDetails", "A class for storing details of population diversity analysis results.")]
+  [StorableClass]
+  public class TSPPopulationDiversityAnalysisDetails : Item {
+
+    [Storable]
+    private IList<double> averageSimilarities;
+    public IList<double> AverageSimilarities {
+      get { return averageSimilarities; }
+    }
+    [Storable]
+    private IList<double> averageMaximumSimilarities;
+    public IList<double> AverageMaximumSimilarities {
+      get { return averageMaximumSimilarities; }
+    }
+
+    [Storable]
+    private IList<double[,]> similarities;
+    public IList<double[,]> Similarities {
+      get { return similarities; }
+    }
+    [Storable]
+    private IList<double[]> maximumSimilarities;
+    public IList<double[]> MaximumSimilarities {
+      get { return maximumSimilarities; }
+    }
+
+    public TSPPopulationDiversityAnalysisDetails()
+        : base() {
+      averageSimilarities = new List<double>();
+      averageMaximumSimilarities = new List<double>();
+      similarities = new List<double[,]>();
+      maximumSimilarities = new List<double[]>();
+    }
+
+  }
+
+}
Index: branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalyzer.cs
===================================================================
--- branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalyzer.cs	(revision 4501)
+++ branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalyzer.cs	(revision 4502)
@@ -44,5 +44,5 @@
     // - iterations sampling
     // - view
-    // - implement data structure for population diversity details
+    // - extract population diversity basic behavior into separate project
 
     public const string PermutationKey = "Permutation";
@@ -58,13 +58,4 @@
     public ValueParameter<BoolValue> StoreCompleteHistoryParameter {
       get { return (ValueParameter<BoolValue>)Parameters[StoreCompleteHistoryKey]; }
-    }
-
-    public const string SimilaritiesKey = "Similarities";
-    public ValueParameter<ItemList<DoubleMatrix>> SimilaritiesParameter {
-      get { return (ValueParameter<ItemList<DoubleMatrix>>)Parameters[SimilaritiesKey]; }
-    }
-    public const string MaximumSimilaritiesKey = "MaximumSimilarities";
-    public ValueParameter<ItemList<DoubleArray>> MaximumSimilaritiesParameter {
-      get { return (ValueParameter<ItemList<DoubleArray>>)Parameters[MaximumSimilaritiesKey]; }
     }
 
@@ -73,4 +64,5 @@
     public const string CurrentAverageMaximumSimilarityKey = "Current Average Maximum Population Similarity";
     public const string AverageMaximumSimilarityProgressKey = "Average Maximum Population Similarity Progress";
+    public const string PopulationDiversityAnalysisResultsDetailsKey = "Population Diversity Analysis Results Details";
 
     public const string ResultsKey = "Results";
@@ -85,7 +77,4 @@
       Parameters.Add(new ValueParameter<BoolValue>(StoreCompleteHistoryKey, "Flag that denotes whether the complete history of similarity values shall be stored.", new BoolValue(true)));
       Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The results collection in which the population diversity analysis results should be stored."));
-
-      Parameters.Add(new ValueParameter<ItemList<DoubleMatrix>>(SimilaritiesKey, "The similarities of the TSP solutions which should be analyzed."));
-      Parameters.Add(new ValueParameter<ItemList<DoubleArray>>(MaximumSimilaritiesKey, "The maximum similarities of the TSP solutions which should be analyzed."));
     }
 
@@ -121,6 +110,6 @@
         edges[i] = CalculateEdgesVector(permutationsArray[i]);
 
-      DoubleMatrix similarities = new DoubleMatrix(cities, cities);
-      DoubleArray maxSimilarities = new DoubleArray(cities);
+      double[,] similarities = new double[cities, cities];
+      double[] maxSimilarities = new double[cities];
       double avgSimilarity = 0;
       int n = 0;
@@ -142,15 +131,4 @@
       DoubleValue averageSimilarity = new DoubleValue(avgSimilarity / n);
 
-      if (SimilaritiesParameter.Value == null) {
-        SimilaritiesParameter.Value = new ItemList<DoubleMatrix>();
-        MaximumSimilaritiesParameter.Value = new ItemList<DoubleArray>();
-      }
-      if (!StoreCompleteHistoryParameter.Value.Value && SimilaritiesParameter.Value.Count > 0) {
-        SimilaritiesParameter.Value[SimilaritiesParameter.Value.Count - 1] = null;
-        MaximumSimilaritiesParameter.Value[MaximumSimilaritiesParameter.Value.Count - 1] = null;
-      }
-      SimilaritiesParameter.Value.Add(similarities);
-      MaximumSimilaritiesParameter.Value.Add(maxSimilarities);
-
       #region Store average similarity values
       if (results.ContainsKey(CurrentAverageSimilarityKey))
@@ -178,4 +156,21 @@
         averageMaximumSimilarityProgressDataTable.Rows.Add(new Analysis.DataRow(AverageMaximumSimilarityProgressKey));
       averageMaximumSimilarityProgressDataTable.Rows[AverageMaximumSimilarityProgressKey].Values.Add(averageMaximumSimilarity.Value);
+      #endregion
+      #region Store details
+      TSPPopulationDiversityAnalysisDetails details;
+      if (!results.ContainsKey(PopulationDiversityAnalysisResultsDetailsKey)) {
+        details = new TSPPopulationDiversityAnalysisDetails();
+        results.Add(new Result(PopulationDiversityAnalysisResultsDetailsKey, details));
+      } else {
+        details = (TSPPopulationDiversityAnalysisDetails)(results[PopulationDiversityAnalysisResultsDetailsKey].Value);
+      }
+      details.AverageSimilarities.Add(averageSimilarity.Value);
+      details.AverageMaximumSimilarities.Add(averageMaximumSimilarity.Value);
+      details.Similarities.Add(similarities);
+      details.MaximumSimilarities.Add(maxSimilarities);
+      if (!StoreCompleteHistoryParameter.Value.Value && details.Similarities.Count > 1) {
+        details.Similarities[details.Similarities.Count - 1] = null;
+        details.MaximumSimilarities[details.MaximumSimilarities.Count - 1] = null;
+      }
       #endregion
 
Index: branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj
===================================================================
--- branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj	(revision 4501)
+++ branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj	(revision 4502)
@@ -154,4 +154,5 @@
   <ItemGroup>
     <Compile Include="Analyzers\BestTSPSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\TSPPopulationDiversityAnalysisDetails.cs" />
     <Compile Include="Analyzers\TSPPopulationDiversityAnalyzer.cs" />
     <Compile Include="Evaluators\TSPEuclideanPathEvaluator.cs" />
