- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 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/Crossovers/MultiBinaryVectorCrossover.cs
r3674 r4722 23 23 using System.Linq; 24 24 using HeuristicLab.Collections; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 27 using HeuristicLab.Operators; … … 50 51 51 52 [StorableConstructor] 52 private MultiBinaryVectorCrossover(bool deserializing) : base(deserializing) { } 53 protected MultiBinaryVectorCrossover(bool deserializing) : base(deserializing) { } 54 protected MultiBinaryVectorCrossover(MultiBinaryVectorCrossover original, Cloner cloner) : base(original, cloner) { } 53 55 public MultiBinaryVectorCrossover() 54 56 : base() { … … 62 64 Operators.Add((IBinaryVectorCrossover)Activator.CreateInstance(type), true); 63 65 } 66 } 67 68 public override IDeepCloneable Clone(Cloner cloner) { 69 return new MultiBinaryVectorCrossover(this, cloner); 64 70 } 65 71 -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/NPointCrossover.cs
r4068 r4722 22 22 using System; 23 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Data; … … 36 37 [Item("NPointCrossover", "N point crossover for binary vectors. 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.")] 37 38 [StorableClass] 38 public class NPointCrossover : BinaryVectorCrossover {39 public sealed class NPointCrossover : BinaryVectorCrossover { 39 40 /// <summary> 40 41 /// Number of crossover points. … … 44 45 } 45 46 47 [StorableConstructor] 48 private NPointCrossover(bool deserializing) : base(deserializing) { } 49 private NPointCrossover(NPointCrossover original, Cloner cloner) : base(original, cloner) { } 46 50 /// <summary> 47 51 /// Initializes a new instance of <see cref="NPointCrossover"/> 48 52 /// </summary> 49 public NPointCrossover() { 53 public NPointCrossover() 54 : base() { 50 55 Parameters.Add(new ValueLookupParameter<IntValue>("N", "Number of crossover points", new IntValue(2))); 56 } 57 58 public override IDeepCloneable Clone(Cloner cloner) { 59 return new NPointCrossover(this, cloner); 51 60 } 52 61 -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/SinglePointCrossover.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 34 35 [Item("SinglePointCrossover", "Single point crossover for binary vectors. It is implemented based on the NPointCrossover.")] 35 36 [StorableClass] 36 public class SinglePointCrossover : BinaryVectorCrossover { 37 public sealed class SinglePointCrossover : BinaryVectorCrossover { 38 39 [StorableConstructor] 40 private SinglePointCrossover(bool deserializing) : base(deserializing) { } 41 private SinglePointCrossover(SinglePointCrossover original, Cloner cloner) : base(original, cloner) { } 42 public SinglePointCrossover() : base() { } 43 44 public override IDeepCloneable Clone(Cloner cloner) { 45 return new SinglePointCrossover(this, cloner); 46 } 47 37 48 /// <summary> 38 49 /// Performs a single point crossover at a randomly chosen position of two -
trunk/sources/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/Crossovers/UniformCrossover.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 33 34 [Item("UniformCrossover", "Uniform crossover for binary vectors. 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.")] 34 35 [StorableClass] 35 public class UniformCrossover : BinaryVectorCrossover { 36 public sealed class UniformCrossover : BinaryVectorCrossover { 37 38 [StorableConstructor] 39 private UniformCrossover(bool deserializing) : base(deserializing) { } 40 private UniformCrossover(UniformCrossover original, Cloner cloner) : base(original, cloner) { } 41 public UniformCrossover() : base() { } 42 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new UniformCrossover(this, cloner); 45 } 46 36 47 /// <summary> 37 48 /// Performs a uniform crossover between two binary vectors.
Note: See TracChangeset
for help on using the changeset viewer.