Changeset 10291 for trunk/sources/HeuristicLab.Optimization.Operators
- Timestamp:
- 01/07/14 11:14:18 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Operators/3.3/ParentCopyCrossover.cs
r9456 r10291 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.