Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/16/15 16:52:52 (10 years ago)
Author:
bburlacu
Message:

#1772:

  • Added missing cloning constructors to the phenotypic and bottom-up similarity analyzers
  • Added missing cloning of private members in the PhenotypicSimilarityCalculator cloning constructor
  • Merged trunk changes into the SymbolicExpressionTreeBottomUpSimilarityCalculator
  • Minor layout fixes to the SymbolicDataAnalysisGenealogyGraphView
Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisBottomUpDiversityAnalyzer.cs

    r11965 r12017  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2121
    2222using HeuristicLab.Analysis;
     23using HeuristicLab.Common;
    2324using HeuristicLab.Core;
    2425using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2526
    2627namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Analyzers {
    27   [Item("SymbolicDataAnalysisBottomUpDiversityAnalyzer", "A diversity analyzer based on the bottom-up similarity between trees.")]
     28  [Item("SymbolicDataAnalysisBottomUpDiversityAnalyzer", "A diversity analyzer based on the bottom-up distance between trees.")]
    2829  [StorableClass]
    2930  public class SymbolicDataAnalysisBottomUpDiversityAnalyzer : SingleObjectivePopulationDiversityAnalyzer {
     
    3132    protected SymbolicDataAnalysisBottomUpDiversityAnalyzer(bool deserializing) : base(deserializing) { }
    3233
    33     [StorableHook(HookType.AfterDeserialization)]
    34     private void AfterDeserialization() {
     34    private SymbolicDataAnalysisBottomUpDiversityAnalyzer(SymbolicDataAnalysisBottomUpDiversityAnalyzer original, Cloner cloner)
     35      : base(original, cloner) {
     36    }
     37
     38    public override IDeepCloneable Clone(Cloner cloner) {
     39      return new SymbolicDataAnalysisBottomUpDiversityAnalyzer(this, cloner);
    3540    }
    3641
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisPhenotypicDiversityAnalyzer.cs

    r11291 r12017  
    2222using System.Linq;
    2323using HeuristicLab.Analysis;
     24using HeuristicLab.Common;
    2425using HeuristicLab.Core;
    2526using HeuristicLab.Data;
     
    2930
    3031namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Analyzers {
    31   [Item("SymbolicDataAnalysisPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic similarity between trees")]
     32  [Item("SymbolicDataAnalysisPhenotypicDiversityAnalyzer", "An analyzer which calculates diversity based on the phenotypic distance between trees")]
    3233  [StorableClass]
    3334  public class SymbolicDataAnalysisPhenotypicDiversityAnalyzer : SingleObjectivePopulationDiversityAnalyzer {
     35    #region parameter names
    3436    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
    3537    private const string EvaluatedValuesParameterName = "EstimatedValues";
     
    3739    private const string ProblemDataParameterName = "ProblemData";
    3840    private const string EstimationLimitsParameterName = "EstimationLimits";
     41    #endregion
    3942
     43    #region parameter properties
    4044    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
    4145      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     
    5660      get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; }
    5761    }
     62    #endregion
    5863
    5964    public SymbolicDataAnalysisPhenotypicDiversityAnalyzer() {
    6065      SimilarityCalculator = new PhenotypicSimilarityCalculator { SolutionVariableName = "SymbolicExpressionTree" };
    61 
     66      #region add parameters
    6267      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees."));
    6368      Parameters.Add(new ScopeTreeLookupParameter<DoubleArray>(EvaluatedValuesParameterName, "Intermediate estimated values to be saved in the scopes."));
     
    6570      Parameters.Add(new ValueLookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
    6671      Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The upper and lower limit that should be used as cut off value for the output values of symbolic data analysis trees."));
     72      #endregion
     73    }
     74
     75    [StorableConstructor]
     76    protected SymbolicDataAnalysisPhenotypicDiversityAnalyzer(bool deserializing)
     77      : base(deserializing) {
     78    }
     79
     80    public override IDeepCloneable Clone(Cloner cloner) {
     81      return new SymbolicDataAnalysisPhenotypicDiversityAnalyzer(this, cloner);
     82    }
     83
     84    private SymbolicDataAnalysisPhenotypicDiversityAnalyzer(SymbolicDataAnalysisPhenotypicDiversityAnalyzer original, Cloner cloner)
     85      : base(original, cloner) {
    6786    }
    6887
Note: See TracChangeset for help on using the changeset viewer.