Changeset 881 for trunk/sources/HeuristicLab.Evolutionary/CrossoverBase.cs
- Timestamp:
- 12/01/08 13:47:10 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Evolutionary/CrossoverBase.cs
r108 r881 27 27 28 28 namespace HeuristicLab.Evolutionary { 29 /// <summary> 30 /// Base class for crossing over operators. 31 /// </summary> 29 32 public abstract class CrossoverBase : OperatorBase { 33 /// <summary> 34 /// Initializes a new instance of <see cref="CrossoverBase"/> with one variable info (<c>Random</c>). 35 /// </summary> 30 36 public CrossoverBase() 31 37 : base() { … … 33 39 } 34 40 41 /// <summary> 42 /// Replaces the parents (the sub scopes of the current <paramref name="scope"/>) with created children 43 /// by crossing over of two adjacent sub scopes. 44 /// </summary> 45 /// <exception cref="InvalidOperationException">Thrown when the size of the mating pool 46 /// is not even.</exception> 47 /// <param name="scope">The current scope whose sub scopes shall be parents.</param> 48 /// <returns><c>null</c>.</returns> 35 49 public override IOperation Apply(IScope scope) { 36 50 IRandom random = GetVariableValue<IRandom>("Random", scope, true); … … 53 67 } 54 68 69 /// <summary> 70 /// Performs a cross over of <paramref name="parent1"/> and <paramref name="parent2"/> 71 /// to create a new <paramref name="child"/>. 72 /// </summary> 73 /// <param name="scope">The current scope.</param> 74 /// <param name="random">A random number generator.</param> 75 /// <param name="parent1">The parent scope 1 to cross over.</param> 76 /// <param name="parent2">The parent scope 2 to cross over.</param> 77 /// <param name="child">The resulting child of the cross over.</param> 55 78 protected abstract void Cross(IScope scope, IRandom random, IScope parent1, IScope parent2, IScope child); 56 79 }
Note: See TracChangeset
for help on using the changeset viewer.