Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/09/15 15:06:49 (10 years ago)
Author:
bburlacu
Message:

#1772: Split EvolutionTrackingAnalyzer into generic and non-generic class. Added SelectionSchemeAnalyzer.

Location:
branches/HeuristicLab.EvolutionTracking
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/EvolutionTrackingAnalyzer.cs

    r12156 r12163  
    3131  [Item("EvolutionTrackingAnalyzer", "Base class for analyzers that use the genealogy graph")]
    3232  [StorableClass]
    33   public abstract class EvolutionTrackingAnalyzer<T> : SingleSuccessorOperator, IAnalyzer where T : class,IItem {
     33  public abstract class EvolutionTrackingAnalyzer : SingleSuccessorOperator, IAnalyzer {
    3434    #region parameter names
    3535    private const string GenerationsParameterName = "Generations";
    3636    private const string ResultsParameterName = "Results";
    3737    private const string PopulationSizeParameterName = "PopulationSize";
    38     private const string PopulationGraphResultName = "PopulationGraph";
     38    protected const string PopulationGraphResultName = "PopulationGraph";
    3939    #endregion
    4040
     
    6464    public IntValue Generation { get { return GenerationsParameter.ActualValue; } }
    6565    public IntValue PopulationSize { get { return PopulationSizeParameter.ActualValue; } }
    66     public IGenealogyGraph<T> PopulationGraph {
     66    public IGenealogyGraph PopulationGraph {
    6767      get {
    6868        if (Results.ContainsKey(PopulationGraphResultName))
    69           return (IGenealogyGraph<T>)Results[PopulationGraphResultName].Value;
     69          return (IGenealogyGraph)Results[PopulationGraphResultName].Value;
    7070        return null;
    7171      }
     
    7979
    8080    protected EvolutionTrackingAnalyzer() {
    81       Parameters.Add(new LookupParameter<IGenealogyGraph<T>>(PopulationGraphResultName, "The genealogy graph."));
     81      Parameters.Add(new LookupParameter<IGenealogyGraph>(PopulationGraphResultName, "The genealogy graph."));
    8282      Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "The number of generations."));
    8383      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The results collection."));
     
    8787    }
    8888
    89     protected EvolutionTrackingAnalyzer(EvolutionTrackingAnalyzer<T> original, Cloner cloner)
     89    protected EvolutionTrackingAnalyzer(EvolutionTrackingAnalyzer original, Cloner cloner)
    9090      : base(original, cloner) {
    9191    }
     
    9494    protected EvolutionTrackingAnalyzer(bool deserializing) : base(deserializing) { }
    9595  }
     96
     97  [Item("EvolutionTrackingAnalyzer", "Base class for analyzers that use the genealogy graph")]
     98  [StorableClass]
     99  public class EvolutionTrackingAnalyzer<T> : EvolutionTrackingAnalyzer where T : class, IItem {
     100    public EvolutionTrackingAnalyzer() { }
     101
     102    protected EvolutionTrackingAnalyzer(EvolutionTrackingAnalyzer original, Cloner cloner) : base(original, cloner) { }
     103
     104    public override IDeepCloneable Clone(Cloner cloner) {
     105      return new EvolutionTrackingAnalyzer<T>(this, cloner);
     106    }
     107
     108    [StorableConstructor]
     109    protected EvolutionTrackingAnalyzer(bool deserializing) : base(deserializing) { }
     110
     111    new public IGenealogyGraph<T> PopulationGraph {
     112      get {
     113        if (Results.ContainsKey(PopulationGraphResultName))
     114          return (IGenealogyGraph<T>)Results[PopulationGraphResultName].Value;
     115        return null;
     116      }
     117    }
     118  }
    96119}
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj

    r12156 r12163  
    112112    <Compile Include="Analyzers\EvolutionTrackingAnalyzer.cs" />
    113113    <Compile Include="Analyzers\GenealogyAnalyzer.cs" />
     114    <Compile Include="Analyzers\SelectionSchemeAnalyzer.cs" />
    114115    <Compile Include="Collections\CloneableCollection.cs" />
    115116    <Compile Include="Fragment.cs" />
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r12155 r12163  
    307307    <Compile Include="Symbols\VariableConditionTreeNode.cs" />
    308308    <Compile Include="Symbols\VariableTreeNode.cs" />
     309    <Compile Include="Tracking\Analyzers\SymbolicDataAnalysisFragmentLengthAnalyzer.cs" />
     310    <Compile Include="Tracking\Analyzers\SymbolicDataAnalysisTraceOverlapAnalyzer.cs" />
    309311    <Compile Include="Tracking\SymbolicDataAnalysisExpressionAfterCrossoverOperator.cs" />
    310312    <Compile Include="Tracking\SymbolicDataAnalysisExpressionAfterManipulatorOperator.cs" />
Note: See TracChangeset for help on using the changeset viewer.