Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/09/14 15:11:16 (10 years ago)
Author:
bburlacu
Message:

#1772: Fixed persistence errors in the GenealogyAnalyzer and the instrumented operators, tweaked display code in the GenealogyGraphChart.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterCrossoverOperator.cs

    r10650 r10830  
    2929  [Item("AfterCrossoverOperator", "A generic operator that can record genealogical relationships between crossover parents and children.")]
    3030  public class AfterCrossoverOperator<T> : EvolutionTrackingOperator<T>, ICrossoverOperator<T> where T : class,IItem {
    31     private const string DefaultParentsParameterName = "Parents";
    32     private const string DefaultChildParameterName = "Child";
    33     public IScopeTreeLookupParameter<T> ParentsParameter { get; set; }
    34     public ILookupParameter<T> ChildParameter { get; set; }
     31    private const string ParentsParameterName = "Parents";
     32    private const string ChildParameterName = "Child";
     33
     34    public IScopeTreeLookupParameter<T> ParentsParameter {
     35      get { return (IScopeTreeLookupParameter<T>)Parameters[ParentsParameterName]; }
     36    }
     37    public ILookupParameter<T> ChildParameter {
     38      get { return (ILookupParameter<T>)Parameters[ChildParameterName]; }
     39    }
    3540
    3641    protected AfterCrossoverOperator(AfterCrossoverOperator<T> original, Cloner cloner)
     
    4247
    4348    public AfterCrossoverOperator() {
    44       ParentsParameter = new ScopeTreeLookupParameter<T>(DefaultParentsParameterName);
    45       ChildParameter = new LookupParameter<T>(DefaultChildParameterName);
    46       Parameters.Add(ParentsParameter);
    47       Parameters.Add(ChildParameter);
     49      Parameters.Add(new ScopeTreeLookupParameter<T>(ParentsParameterName));
     50      Parameters.Add(new LookupParameter<T>(ChildParameterName));
    4851    }
    4952
Note: See TracChangeset for help on using the changeset viewer.