- Timestamp:
- 07/11/12 00:51:56 (12 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior/3.3/Analyzers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior/3.3/Analyzers/ConvergenceSpeedAnalyzer.cs
r8269 r8281 117 117 } 118 118 119 var schemataMatrix = new Dictionary<int, string>(); 119 120 DataTable dt = new DataTable(); 121 DataRow row = new DataRow("Diversity"); 122 dt.Rows.Add(row); 120 123 foreach (var ind in occurences.Keys) { 121 if (!schemataMatrix.ContainsKey(ind)) { 122 string result = occurences[ind].ToString(); 123 schemataMatrix.Add(ind, result); 124 } 124 dt.Rows["Diversity"].Values.Add(occurences[ind]); 125 125 } 126 126 127 var stringMatrix = new StringMatrix(schemataMatrix.Keys.Count, 2); 128 for (int i = 0; i < schemataMatrix.Keys.Count; i++) { 129 var element = schemataMatrix.ElementAt(i); 130 stringMatrix[i, 0] = element.Key.ToString(); 131 stringMatrix[i, 1] = element.Value; 132 } 133 stringMatrix.ColumnNames = new[] { "Generation", "Diversity" }; 134 135 Results.Add(new Result(SchemaOccurenceInGenerationsMatrixParameterName, stringMatrix)); 136 127 Results.Add(new Result(SchemaOccurenceInGenerationsMatrixParameterName, dt)); 137 128 return base.Apply(); 138 129 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior/3.3/Analyzers/DistinctSolutionsAnalyzer.cs
r8279 r8281 43 43 private const string PopulationGraphResultParameterName = "PopulationGraph"; 44 44 private const string SchemataParameterName = "Schemata"; 45 private const string SchemaOccurenceInGenerationsMatrixParameterName = "SchemaOccurenceInGenerationsMatrix";45 private const string DistinctSolutionsInGenerationsMatrixParameterName = "DistinctSolutionsInGenerationsMatrix"; 46 46 private const string QualitiesParameterName = "Qualities"; 47 47 private const string DistanceMatrixParameterName = "DistanceMatrix"; … … 121 121 } 122 122 123 Results.Add(new Result( SchemaOccurenceInGenerationsMatrixParameterName, dt));123 Results.Add(new Result(DistinctSolutionsInGenerationsMatrixParameterName, dt)); 124 124 return base.Apply(); 125 125 }
Note: See TracChangeset
for help on using the changeset viewer.