- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SinglePositionBitflipManipulator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 32 33 [Item("SinglePositionBitflipManipulator", "Flips exactly one bit of a binary vector. It is implemented as described in Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg.")] 33 34 [StorableClass] 34 public class SinglePositionBitflipManipulator : BinaryVectorManipulator { 35 public sealed class SinglePositionBitflipManipulator : BinaryVectorManipulator { 36 37 [StorableConstructor] 38 private SinglePositionBitflipManipulator(bool deserializing) : base(deserializing) { } 39 private SinglePositionBitflipManipulator(SinglePositionBitflipManipulator original, Cloner cloner) : base(original, cloner) { } 40 public SinglePositionBitflipManipulator() : base() { } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new SinglePositionBitflipManipulator(this, cloner); 44 } 45 35 46 /// <summary> 36 47 /// Performs the single position bitflip mutation on a binary vector. -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Manipulators/SomePositionsBitflipManipulator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 34 35 [Item("SomePositionsBitflipManipulator", "Flips some bits of a binary vector, each position is flipped with a probability of pm. It is implemented as described in Eiben, A.E. and Smith, J.E. 2003. Introduction to Evolutionary Computation. Natural Computing Series, Springer-Verlag Berlin Heidelberg, p. 43.")] 35 36 [StorableClass] 36 public class SomePositionsBitflipManipulator : BinaryVectorManipulator {37 public sealed class SomePositionsBitflipManipulator : BinaryVectorManipulator { 37 38 /// <summary> 38 39 /// Mmutation probability for each position. … … 42 43 } 43 44 45 [StorableConstructor] 46 private SomePositionsBitflipManipulator(bool deserializing) : base(deserializing) { } 47 private SomePositionsBitflipManipulator(SomePositionsBitflipManipulator original, Cloner cloner) : base(original, cloner) { } 44 48 /// <summary> 45 49 /// Initializes a new instance of <see cref="NPointCrossover"/> 46 50 /// </summary> 47 public SomePositionsBitflipManipulator() { 51 public SomePositionsBitflipManipulator() 52 : base() { 48 53 Parameters.Add(new ValueLookupParameter<DoubleValue>("MutationProbability", "The mutation probability for each position", new DoubleValue(0.2))); 54 } 55 56 public override IDeepCloneable Clone(Cloner cloner) { 57 return new SomePositionsBitflipManipulator(this, cloner); 49 58 } 50 59
Note: See TracChangeset
for help on using the changeset viewer.