Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/18/12 00:15:40 (12 years ago)
Author:
ascheibe
Message:

#1886 added helper classes for generating charts

File:
1 edited

Legend:

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

    r8415 r8498  
    5656    }
    5757
    58     private DataRow dtRow;
     58    private DataTableHelper chartingHelper;
    5959    #endregion
    6060
     
    6868      SimilarityCalculatorParameter.Value.SolutionVariableName = "TSPTour";
    6969      SimilarityCalculatorParameter.Value.QualityVariableName = "TSPTourLength";
     70
     71      chartingHelper = new DataTableHelper();
    7072    }
    7173
     
    7577
    7678    public override IOperation Apply() {
    77       if (!Results.ContainsKey("Duplicate Solutions")) {
    78         DataTable dt = new DataTable("Duplicate Solutions");
    79         dtRow = new DataRow("Duplicate Solutions per Generation");
    80         dt.Rows.Add(dtRow);
    81         Results.Add(new Result("Duplicate Solutions", dt));
    82       }
     79      chartingHelper.InitializeChart(Results, "Duplicate Solutions", "Duplicate Solutions per Generation");
    8380
    8481      var similarities = SimilarityCalculatorParameter.Value.CalculateSolutionCrowdSimilarity(ExecutionContext.Scope);
     
    9289        }
    9390      }
    94       dtRow.Values.Add(counter);
    9591
     92      chartingHelper.AddPoint(counter);
    9693      return base.Apply();
    9794    }
Note: See TracChangeset for help on using the changeset viewer.