Changeset 16829 for branches/2994-AutoDiffForIntervals/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingCrossover.cs
- Timestamp:
- 04/19/19 09:09:45 (6 years ago)
- Location:
- branches/2994-AutoDiffForIntervals
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2994-AutoDiffForIntervals
- Property svn:mergeinfo changed
/trunk merged: 16740,16743,16757-16758,16762-16764,16768-16769,16779,16782-16784,16788,16792,16794-16799,16802,16819-16822
- Property svn:mergeinfo changed
-
branches/2994-AutoDiffForIntervals/HeuristicLab.Optimization
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Optimization (added) merged: 16782,16784,16794,16796
- Property svn:mergeinfo changed
-
branches/2994-AutoDiffForIntervals/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingCrossover.cs
r16565 r16829 20 20 #endregion 21 21 22 using HEAL.Attic; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 using H EAL.Attic;25 using HeuristicLab.Parameters; 25 26 26 27 namespace HeuristicLab.Optimization { 27 28 [Item("MultiEncoding Crossover", "Applies different crossovers to cross a multi-encoding.")] 28 29 [StorableType("BB0A04E2-899D-460C-82A2-5E4CEEDE8996")] 29 public sealed class MultiEncodingCrossover : MultiEncodingOperator<ICrossover>, ICrossover { 30 public sealed class MultiEncodingCrossover : MultiEncodingOperator<ICrossover>, ICrossover, IStochasticOperator { 31 public ILookupParameter<IRandom> RandomParameter { 32 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 33 } 34 35 public override string OperatorPrefix => "Crossover"; 36 30 37 [StorableConstructor] 31 38 private MultiEncodingCrossover(StorableConstructorFlag _) : base(_) { } 32 39 private MultiEncodingCrossover(MultiEncodingCrossover original, Cloner cloner) : base(original, cloner) { } 33 public MultiEncodingCrossover() { } 40 public MultiEncodingCrossover() { 41 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator used by the individual operators.")); 42 } 34 43 35 44 public override IDeepCloneable Clone(Cloner cloner) { return new MultiEncodingCrossover(this, cloner); } 45 46 [StorableHook(HookType.AfterDeserialization)] 47 private void AfterDeserialization() { 48 if (!Parameters.ContainsKey("Random")) { 49 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator used by the individual operators.")); 50 } 51 } 36 52 } 37 53 }
Note: See TracChangeset
for help on using the changeset viewer.