Changeset 10483 for branches/LogResidualEvaluator/HeuristicLab.Optimization.Operators/3.3/ParentCopyCrossover.cs
- Timestamp:
- 02/20/14 14:56:39 (11 years ago)
- Location:
- branches/LogResidualEvaluator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LogResidualEvaluator
- Property svn:mergeinfo changed
-
branches/LogResidualEvaluator/HeuristicLab.Optimization.Operators/3.3/ParentCopyCrossover.cs
r9456 r10483 29 29 [Item("ParentCopyCrossover", "This operator creates an offspring by creating a clone of a randomly chosen parent. It can be used in situations where no crossover should occur after selection.")] 30 30 [StorableClass] 31 public class ParentCopyCrossover : SingleSuccessorOperator, ICrossover, IStochasticOperator {31 public class ParentCopyCrossover : InstrumentedOperator, ICrossover, IStochasticOperator { 32 32 public ILookupParameter<IRandom> RandomParameter { 33 33 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } … … 43 43 } 44 44 45 public override IOperation Apply() {45 public override IOperation InstrumentedApply() { 46 46 IScope scope = ExecutionContext.Scope; 47 47 int index = RandomParameter.ActualValue.Next(scope.SubScopes.Count); … … 51 51 scope.Variables.Add((IVariable)var.Clone()); 52 52 53 return base. Apply();53 return base.InstrumentedApply(); 54 54 } 55 55
Note: See TracChangeset
for help on using the changeset viewer.