Changeset 10830 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterCrossoverOperator.cs
- Timestamp:
- 05/09/14 15:11:16 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterCrossoverOperator.cs
r10650 r10830 29 29 [Item("AfterCrossoverOperator", "A generic operator that can record genealogical relationships between crossover parents and children.")] 30 30 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 } 35 40 36 41 protected AfterCrossoverOperator(AfterCrossoverOperator<T> original, Cloner cloner) … … 42 47 43 48 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)); 48 51 } 49 52
Note: See TracChangeset
for help on using the changeset viewer.