- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 13 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.RealVectorEncoding/3.3/Crossovers/AverageCrossover.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 AverageCrossover : RealVectorCrossover { 37 [StorableConstructor] 38 protected AverageCrossover(bool deserializing) : base(deserializing) { } 39 protected AverageCrossover(AverageCrossover original, Cloner cloner) : base(original, cloner) { } 40 public AverageCrossover() : base() { } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new AverageCrossover(this, cloner); 44 } 45 36 46 /// <summary> 37 47 /// Performs the average crossover (intermediate recombination) on a list of parents. -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaBetaCrossover.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 65 66 } 66 67 68 [StorableConstructor] 69 protected BlendAlphaBetaCrossover(bool deserializing) : base(deserializing) { } 70 protected BlendAlphaBetaCrossover(BlendAlphaBetaCrossover original, Cloner cloner) : base(original, cloner) { } 67 71 /// <summary> 68 72 /// Initializes a new instance of <see cref="BlendAlphaBetaCrossover"/> with four additional parameters … … 75 79 Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The Alpha parameter controls the extension of the range beyond the better parent. The value must be >= 0 and does not depend on Beta.", new DoubleValue(0.75))); 76 80 Parameters.Add(new ValueLookupParameter<DoubleValue>("Beta", "The Beta parameter controls the extension of the range beyond the worse parent. The value must be >= 0 and does not depend on Alpha.", new DoubleValue(0.25))); 81 } 82 83 public override IDeepCloneable Clone(Cloner cloner) { 84 return new BlendAlphaBetaCrossover(this, cloner); 77 85 } 78 86 -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/BlendAlphaCrossover.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 48 49 get { return (ValueLookupParameter<DoubleValue>)Parameters["Alpha"]; } 49 50 } 51 52 [StorableConstructor] 53 protected BlendAlphaCrossover(bool deserializing) : base(deserializing) { } 54 protected BlendAlphaCrossover(BlendAlphaCrossover original, Cloner cloner) : base(original, cloner) { } 50 55 /// <summary> 51 56 /// Initializes a new instance of <see cref="BlendAlphaCrossover"/> with one parameter (<c>Alpha</c>). … … 54 59 : base() { 55 60 Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The Alpha parameter controls the extension of the range beyond the two parents. It must be >= 0. A value of 0.5 means that half the range is added to both sides of the intervals.", new DoubleValue(0.5))); 61 } 62 63 public override IDeepCloneable Clone(Cloner cloner) { 64 return new BlendAlphaCrossover(this, cloner); 56 65 } 57 66 -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/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; … … 36 37 [StorableClass] 37 38 public class DiscreteCrossover : RealVectorCrossover { 39 [StorableConstructor] 40 protected DiscreteCrossover(bool deserializing) : base(deserializing) { } 41 protected DiscreteCrossover(DiscreteCrossover original, Cloner cloner) : base(original, cloner) { } 42 public DiscreteCrossover() : base() { } 43 44 public override IDeepCloneable Clone(Cloner cloner) { 45 return new DiscreteCrossover(this, cloner); 46 } 47 38 48 /// <summary> 39 49 /// Performs a discrete crossover operation on multiple parents. -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/HeuristicCrossover.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 50 51 } 51 52 53 [StorableConstructor] 54 protected HeuristicCrossover(bool deserializing) : base(deserializing) { } 55 protected HeuristicCrossover(HeuristicCrossover original, Cloner cloner) : base(original, cloner) { } 52 56 /// <summary> 53 57 /// Initializes a new instance of <see cref="HeuristicCrossover"/> with two variable infos … … 58 62 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "Whether the problem is a maximization problem or not.")); 59 63 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The quality values of the parents.")); 64 } 65 66 public override IDeepCloneable Clone(Cloner cloner) { 67 return new HeuristicCrossover(this, cloner); 60 68 } 61 69 -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/LocalCrossover.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 LocalCrossover : RealVectorCrossover { 37 [StorableConstructor] 38 protected LocalCrossover(bool deserializing) : base(deserializing) { } 39 protected LocalCrossover(LocalCrossover original, Cloner cloner) : base(original, cloner) { } 40 public LocalCrossover() : base() { } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new LocalCrossover(this, cloner); 44 } 45 36 46 /// <summary> 37 47 /// Performs a local crossover on the two given parent vectors. -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/MultiRealVectorCrossover.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.Data; … … 53 54 54 55 [StorableConstructor] 55 private MultiRealVectorCrossover(bool deserializing) : base(deserializing) { } 56 protected MultiRealVectorCrossover(bool deserializing) : base(deserializing) { } 57 protected MultiRealVectorCrossover(MultiRealVectorCrossover original, Cloner cloner) 58 : base(original, cloner) { 59 } 56 60 public MultiRealVectorCrossover() 57 61 : base() { … … 66 70 Operators.Add((IRealVectorCrossover)Activator.CreateInstance(type), true); 67 71 } 72 } 73 74 public override IDeepCloneable Clone(Cloner cloner) { 75 return new MultiRealVectorCrossover(this, cloner); 68 76 } 69 77 -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/RandomConvexCrossover.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 RandomConvexCrossover : RealVectorCrossover { 37 [StorableConstructor] 38 protected RandomConvexCrossover(bool deserializing) : base(deserializing) { } 39 protected RandomConvexCrossover(RandomConvexCrossover original, Cloner cloner) : base(original, cloner) { } 40 public RandomConvexCrossover() : base() { } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new RandomConvexCrossover(this, cloner); 44 } 45 36 46 /// <summary> 37 47 /// Performs a random convex crossover on the two given parents. -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/SimulatedBinaryCrossover.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 44 45 } 45 46 47 [StorableConstructor] 48 protected SimulatedBinaryCrossover(bool deserializing) : base(deserializing) { } 49 protected SimulatedBinaryCrossover(SimulatedBinaryCrossover original, Cloner cloner) : base(original, cloner) { } 46 50 /// <summary> 47 51 /// Initializes a new instance of <see cref="SimulatedBinaryCrossover"/> with one … … 51 55 : base() { 52 56 Parameters.Add(new ValueLookupParameter<DoubleValue>("Contiguity", "Specifies whether the crossover should produce very different (small value) or very similar (large value) children. Valid values must be greater or equal to 0.", new DoubleValue(2))); 57 } 58 59 public override IDeepCloneable Clone(Cloner cloner) { 60 return new SimulatedBinaryCrossover(this, cloner); 53 61 } 54 62 -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/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; … … 36 37 [StorableClass] 37 38 public class SinglePointCrossover : RealVectorCrossover { 39 [StorableConstructor] 40 protected SinglePointCrossover(bool deserializing) : base(deserializing) { } 41 protected 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 38 48 /// <summary> 39 49 /// Performs the single point crossover for real vectors. The implementation is similar to the single point crossover for binary vectors. -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformAllPositionsArithmeticCrossover.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 44 45 } 45 46 47 [StorableConstructor] 48 protected UniformAllPositionsArithmeticCrossover(bool deserializing) : base(deserializing) { } 49 protected UniformAllPositionsArithmeticCrossover(UniformAllPositionsArithmeticCrossover original, Cloner cloner) : base(original, cloner) { } 46 50 /// <summary> 47 51 /// Initializes a new instance with one parameter (<c>Alpha</c>). … … 50 54 : base() { 51 55 Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The alpha value in the range [0;1]", new DoubleValue(0.33))); 56 } 57 58 public override IDeepCloneable Clone(Cloner cloner) { 59 return new UniformAllPositionsArithmeticCrossover(this, cloner); 52 60 } 53 61 -
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Crossovers/UniformSomePositionsArithmeticCrossover.cs
r4068 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 50 51 } 51 52 53 [StorableConstructor] 54 protected UniformSomePositionsArithmeticCrossover(bool deserializing) : base(deserializing) { } 55 protected UniformSomePositionsArithmeticCrossover(UniformSomePositionsArithmeticCrossover original, Cloner cloner) : base(original, cloner) { } 52 56 /// <summary> 53 57 /// Initializes a new instance with two parameters (<c>Alpha</c> and <c>Probability</c>). … … 57 61 Parameters.Add(new ValueLookupParameter<DoubleValue>("Alpha", "The alpha value in the range [0;1] that defines whether the point should be close to parent1 (=1) or parent2 (=0)", new DoubleValue(0.5))); 58 62 Parameters.Add(new ValueLookupParameter<DoubleValue>("Probability", "The probability for crossing a position in the range [0;1]", new DoubleValue(0.5))); 63 } 64 65 public override IDeepCloneable Clone(Cloner cloner) { 66 return new UniformSomePositionsArithmeticCrossover(this, cloner); 59 67 } 60 68
Note: See TracChangeset
for help on using the changeset viewer.