Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8281


Ignore:
Timestamp:
07/11/12 00:51:56 (12 years ago)
Author:
ascheibe
Message:

#1886 added datatable to convergence speed analyzer

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  
    117117      }
    118118
    119       var schemataMatrix = new Dictionary<int, string>();
     119
     120      DataTable dt = new DataTable();
     121      DataRow row = new DataRow("Diversity");
     122      dt.Rows.Add(row);
    120123      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]);
    125125      }
    126126
    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));
    137128      return base.Apply();
    138129    }
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior/3.3/Analyzers/DistinctSolutionsAnalyzer.cs

    r8279 r8281  
    4343    private const string PopulationGraphResultParameterName = "PopulationGraph";
    4444    private const string SchemataParameterName = "Schemata";
    45     private const string SchemaOccurenceInGenerationsMatrixParameterName = "SchemaOccurenceInGenerationsMatrix";
     45    private const string DistinctSolutionsInGenerationsMatrixParameterName = "DistinctSolutionsInGenerationsMatrix";
    4646    private const string QualitiesParameterName = "Qualities";
    4747    private const string DistanceMatrixParameterName = "DistanceMatrix";
     
    121121      }
    122122
    123       Results.Add(new Result(SchemaOccurenceInGenerationsMatrixParameterName, dt));
     123      Results.Add(new Result(DistinctSolutionsInGenerationsMatrixParameterName, dt));
    124124      return base.Apply();
    125125    }
Note: See TracChangeset for help on using the changeset viewer.