Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8279


Ignore:
Timestamp:
07/11/12 00:10:15 (12 years ago)
Author:
ascheibe
Message:

#1886 save distinct solutions in a data table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior/3.3/Analyzers/DistinctSolutionsAnalyzer.cs

    r8278 r8279  
    113113      }
    114114
    115       var stringMatrix = new StringMatrix(generations, 2);
     115      DataTable dt = new DataTable();
     116      DataRow row = new DataRow("Distinct Solutions");
     117      dt.Rows.Add(row);
    116118      for (int i = 0; i < distinctSolsInGen.Keys.Count; i++) {
    117119        var element = distinctSolsInGen.ElementAt(i);
    118         stringMatrix[i, 0] = element.Key.ToString();
    119         stringMatrix[i, 1] = element.Value.ToString();
     120        dt.Rows["Distinct Solutions"].Values.Add(element.Value);
    120121      }
    121       stringMatrix.ColumnNames = new[] { "Generation", "Distinct Solutions" };
    122122
    123       Results.Add(new Result(SchemaOccurenceInGenerationsMatrixParameterName, stringMatrix));
    124 
     123      Results.Add(new Result(SchemaOccurenceInGenerationsMatrixParameterName, dt));
    125124      return base.Apply();
    126125    }
Note: See TracChangeset for help on using the changeset viewer.