Changeset 4722 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers
- 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.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs
r4106 r4722 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 26 27 using HeuristicLab.Data; … … 37 38 [Item("SubtreeCrossover", "An operator which performs subtree swapping crossover.")] 38 39 [StorableClass] 39 public class SubtreeCrossover : SymbolicExpressionTreeCrossover {40 public sealed class SubtreeCrossover : SymbolicExpressionTreeCrossover { 40 41 public IValueLookupParameter<PercentValue> InternalCrossoverPointProbabilityParameter { 41 42 get { return (IValueLookupParameter<PercentValue>)Parameters["InternalCrossoverPointProbability"]; } 42 43 } 43 44 [StorableConstructor] 45 private SubtreeCrossover(bool deserializing) : base(deserializing) { } 46 private SubtreeCrossover(SubtreeCrossover original, Cloner cloner) : base(original, cloner) { } 44 47 public SubtreeCrossover() 45 48 : base() { 46 49 Parameters.Add(new ValueLookupParameter<PercentValue>("InternalCrossoverPointProbability", "The probability to select an internal crossover point (instead of a leaf node).", new PercentValue(0.9))); 50 } 51 52 public override IDeepCloneable Clone(Cloner cloner) { 53 return new SubtreeCrossover(this, cloner); 47 54 } 48 55 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SymbolicExpressionTreeCrossover.cs
r4123 r4722 21 21 22 22 using System; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 50 51 get { return FailedCrossoverEventsParameter.Value; } 51 52 } 53 [StorableConstructor] 54 protected SymbolicExpressionTreeCrossover(bool deserializing) : base(deserializing) { } 55 protected SymbolicExpressionTreeCrossover(SymbolicExpressionTreeCrossover original, Cloner cloner) : base(original, cloner) { } 52 56 protected SymbolicExpressionTreeCrossover() 53 57 : base() {
Note: See TracChangeset
for help on using the changeset viewer.