Changeset 4674 for branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers
- Timestamp:
- 10/29/10 18:55:22 (14 years ago)
- Location:
- branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SubtreeCrossover.cs
r4106 r4674 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 -
branches/CloningRefactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Crossovers/SymbolicExpressionTreeCrossover.cs
r4123 r4674 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.