- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 10 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.IntegerVectorEncoding/3.3/Creators/UniformRandomIntegerVectorCreator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 31 32 [StorableClass] 32 33 public class UniformRandomIntegerVectorCreator : IntegerVectorCreator { 34 [StorableConstructor] 35 protected UniformRandomIntegerVectorCreator(bool deserializing) : base(deserializing) { } 36 protected UniformRandomIntegerVectorCreator(UniformRandomIntegerVectorCreator original, Cloner cloner) : base(original, cloner) { } 37 public UniformRandomIntegerVectorCreator() : base() { } 38 39 public override IDeepCloneable Clone(Cloner cloner) { 40 return new UniformRandomIntegerVectorCreator(this, cloner); 41 } 42 33 43 /// <summary> 34 44 /// Generates a new random integer vector with the given <paramref name="length"/>. -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/DiscreteCrossover.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; … … 34 35 [StorableClass] 35 36 public class DiscreteCrossover : IntegerVectorCrossover { 37 [StorableConstructor] 38 protected DiscreteCrossover(bool deserializing) : base(deserializing) { } 39 protected DiscreteCrossover(DiscreteCrossover original, Cloner cloner) : base(original, cloner) { } 40 public DiscreteCrossover() : base() { } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new DiscreteCrossover(this, cloner); 44 } 45 36 46 /// <summary> 37 47 /// Performs a discrete crossover operation of the two given parents. -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/MultiIntegerVectorCrossover.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 MultiIntegerVectorCrossover(bool deserializing) : base(deserializing) { } 53 protected MultiIntegerVectorCrossover(bool deserializing) : base(deserializing) { } 54 protected MultiIntegerVectorCrossover(MultiIntegerVectorCrossover original, Cloner cloner) : base(original, cloner) { } 53 55 public MultiIntegerVectorCrossover() 54 56 : base() { … … 62 64 Operators.Add((IIntegerVectorCrossover)Activator.CreateInstance(type), true); 63 65 } 66 } 67 68 public override IDeepCloneable Clone(Cloner cloner) { 69 return new MultiIntegerVectorCrossover(this, cloner); 64 70 } 65 71 -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/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.Persistence.Default.CompositeSerializers.Storable; … … 34 35 [StorableClass] 35 36 public class SinglePointCrossover : IntegerVectorCrossover { 37 [StorableConstructor] 38 protected SinglePointCrossover(bool deserializing) : base(deserializing) { } 39 protected SinglePointCrossover(SinglePointCrossover original, Cloner cloner) : base(original, cloner) { } 40 public SinglePointCrossover() : base() { } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new SinglePointCrossover(this, cloner); 44 } 45 36 46 /// <summary> 37 47 /// Performs a single point crossover at a randomly chosen position of the two -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVector.cs
r3431 r4722 29 29 [Item("IntegerVector", "Represents a vector of integer values.")] 30 30 public class IntegerVector : IntArray { 31 [StorableConstructor] 32 protected IntegerVector(bool deserializing) : base(deserializing) { } 33 protected IntegerVector(IntegerVector original, Cloner cloner) : base(original, cloner) { } 31 34 public IntegerVector() : base() { } 32 35 public IntegerVector(int length) : base(length) { } … … 43 46 44 47 public override IDeepCloneable Clone(Cloner cloner) { 45 IntegerVector clone = new IntegerVector(array); 46 cloner.RegisterClonedObject(this, clone); 47 clone.readOnly = readOnly; 48 return clone; 48 return new IntegerVector(this, cloner); 49 49 } 50 50 -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCreator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 53 54 } 54 55 56 [StorableConstructor] 57 protected IntegerVectorCreator(bool deserializing) : base(deserializing) { } 58 protected IntegerVectorCreator(IntegerVectorCreator original, Cloner cloner) : base(original, cloner) { } 55 59 protected IntegerVectorCreator() 56 60 : base() { -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorCrossover.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Operators; … … 46 47 } 47 48 49 [StorableConstructor] 50 protected IntegerVectorCrossover(bool deserializing) : base(deserializing) { } 51 protected IntegerVectorCrossover(IntegerVectorCrossover original, Cloner cloner) : base(original, cloner) { } 48 52 protected IntegerVectorCrossover() 49 53 : base() { -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorManipulator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Operators; … … 43 44 } 44 45 46 [StorableConstructor] 47 protected IntegerVectorManipulator(bool deserializing) : base(deserializing) { } 48 protected IntegerVectorManipulator(IntegerVectorManipulator original, Cloner cloner) : base(original, cloner) { } 45 49 protected IntegerVectorManipulator() 46 50 : base() { -
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 49 50 } 50 51 52 [StorableConstructor] 53 protected UniformOnePositionManipulator(bool deserializing) : base(deserializing) { } 54 protected UniformOnePositionManipulator(UniformOnePositionManipulator original, Cloner cloner) : base(original, cloner) { } 51 55 /// <summary> 52 56 /// Initializes a new instance of <see cref="UniformOnePositionManipulator"/> with two parameters 53 57 /// (<c>Minimum</c> and <c>Maximum</c>). 54 58 /// </summary> 55 public UniformOnePositionManipulator() { 59 public UniformOnePositionManipulator() 60 : base() { 56 61 Parameters.Add(new ValueLookupParameter<IntValue>("Minimum", "Minimum of the sampling range for the vector element (included)")); 57 62 Parameters.Add(new ValueLookupParameter<IntValue>("Maximum", "Maximum of the sampling range for the vector element (excluded)")); 63 } 64 65 public override IDeepCloneable Clone(Cloner cloner) { 66 return new UniformOnePositionManipulator(this, cloner); 58 67 } 59 68
Note: See TracChangeset
for help on using the changeset viewer.