Changeset 17111 for stable/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingManipulator.cs
- Timestamp:
- 07/08/19 15:37:35 (5 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk merged: 16782-16783
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimization
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Optimization merged: 16782
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimization/3.3/BasicProblems/Operators/MultiEncodingManipulator.cs
r17097 r17111 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 Manipulator", "Applies different manipulators to change a multi-encoding.")] 28 29 [StorableType("574D0530-47E8-4FD9-8AC8-B8EA2DE3C203")] 29 public sealed class MultiEncodingManipulator : MultiEncodingOperator<IManipulator>, IManipulator { 30 public sealed class MultiEncodingManipulator : MultiEncodingOperator<IManipulator>, IManipulator, IStochasticOperator { 31 public ILookupParameter<IRandom> RandomParameter { 32 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 33 } 34 35 public override string OperatorPrefix => "Manipulator"; 36 30 37 [StorableConstructor] 31 38 private MultiEncodingManipulator(StorableConstructorFlag _) : base(_) { } 32 39 private MultiEncodingManipulator(MultiEncodingManipulator original, Cloner cloner) 33 40 : base(original, cloner) { } 34 public MultiEncodingManipulator() { } 41 public MultiEncodingManipulator() { 42 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator used by the individual operators.")); 43 } 35 44 36 45 public override IDeepCloneable Clone(Cloner cloner) { return new MultiEncodingManipulator(this, cloner); } 37 46 47 [StorableHook(HookType.AfterDeserialization)] 48 private void AfterDeserialization() { 49 if (!Parameters.ContainsKey("Random")) { 50 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator used by the individual operators.")); 51 } 52 } 53 38 54 } 39 55 }
Note: See TracChangeset
for help on using the changeset viewer.