Changeset 4722 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 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/Manipulators/ChangeNodeTypeManipulation.cs
r4189 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; … … 31 32 [StorableClass] 32 33 [Item("ChangeNodeTypeManipulation", "Selects a random tree node and changes the symbol.")] 33 public class ChangeNodeTypeManipulation : SymbolicExpressionTreeManipulator {34 public sealed class ChangeNodeTypeManipulation : SymbolicExpressionTreeManipulator { 34 35 35 public ChangeNodeTypeManipulation() 36 : base() { 36 [StorableConstructor] 37 private ChangeNodeTypeManipulation(bool deserializing) : base(deserializing) { } 38 private ChangeNodeTypeManipulation(ChangeNodeTypeManipulation original, Cloner cloner) : base(original, cloner) { } 39 public ChangeNodeTypeManipulation() : base() { } 40 41 public override IDeepCloneable Clone(Cloner cloner) { 42 return new ChangeNodeTypeManipulation(this, cloner); 37 43 } 38 44 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/FullTreeShaker.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 27 28 [StorableClass] 28 29 [Item("FullTreeShaker", "Manipulates all nodes that have local parameters.")] 29 public class FullTreeShaker : SymbolicExpressionTreeManipulator {30 public sealed class FullTreeShaker : SymbolicExpressionTreeManipulator { 30 31 31 public FullTreeShaker() 32 : base() { 32 [StorableConstructor] 33 private FullTreeShaker(bool deserializing) : base(deserializing) { } 34 private FullTreeShaker(FullTreeShaker original, Cloner cloner) : base(original, cloner) { } 35 public FullTreeShaker() : base() { } 36 37 public override IDeepCloneable Clone(Cloner cloner) { 38 return new FullTreeShaker(this, cloner); 33 39 } 34 40 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
r4068 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; … … 35 36 [Item("MultiSymbolicExpressionTreeManipulator", "Randomly selects and applies one of its manipulators every time it is called.")] 36 37 [StorableClass] 37 public class MultiSymbolicExpressionTreeManipulator : StochasticMultiBranch<ISymbolicExpressionTreeManipulator>, ISymbolicExpressionTreeManipulator, IStochasticOperator {38 public sealed class MultiSymbolicExpressionTreeManipulator : StochasticMultiBranch<ISymbolicExpressionTreeManipulator>, ISymbolicExpressionTreeManipulator, IStochasticOperator { 38 39 private const string MaxTreeSizeParameterName = "MaxTreeSize"; 39 40 private const string MaxTreeHeightParameterName = "MaxTreeHeight"; … … 66 67 #endregion 67 68 68 69 69 [StorableConstructor] 70 70 private MultiSymbolicExpressionTreeManipulator(bool deserializing) : base(deserializing) { } 71 private MultiSymbolicExpressionTreeManipulator(MultiSymbolicExpressionTreeManipulator original, Cloner cloner) : base(original, cloner) { } 71 72 public MultiSymbolicExpressionTreeManipulator() 72 73 : base() { … … 80 81 Operators.Add((ISymbolicExpressionTreeManipulator)Activator.CreateInstance(type), true); 81 82 } 83 } 84 85 public override IDeepCloneable Clone(Cloner cloner) { 86 return new MultiSymbolicExpressionTreeManipulator(this, cloner); 82 87 } 83 88 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/OnePointShaker.cs
r4068 r4722 21 21 22 22 using System.Linq; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; … … 28 29 [StorableClass] 29 30 [Item("OnePointShaker", "Selects a random node with local parameters and manipulates the selected node.")] 30 public class OnePointShaker : SymbolicExpressionTreeManipulator { 31 public sealed class OnePointShaker : SymbolicExpressionTreeManipulator { 32 [StorableConstructor] 33 private OnePointShaker(bool deserializing) : base(deserializing) { } 34 private OnePointShaker(OnePointShaker original, Cloner cloner) : base(original, cloner) { } 35 public OnePointShaker() : base() { } 31 36 32 public OnePointShaker()33 : base() {37 public override IDeepCloneable Clone(Cloner cloner) { 38 return new OnePointShaker(this, cloner); 34 39 } 35 40 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/ReplaceBranchManipulation.cs
r4189 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; 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators; 27 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols; 28 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;30 31 31 32 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators { 32 33 [StorableClass] 33 34 [Item("ReplaceBranchManipulation", "Selects a branch of the tree randomly and replaces it with a newly initialized branch (using PTC2).")] 34 public class ReplaceBranchManipulation : SymbolicExpressionTreeManipulator { 35 public sealed class ReplaceBranchManipulation : SymbolicExpressionTreeManipulator { 36 [StorableConstructor] 37 private ReplaceBranchManipulation(bool deserializing) : base(deserializing) { } 38 private ReplaceBranchManipulation(ReplaceBranchManipulation original, Cloner cloner) : base(original, cloner) { } 39 public ReplaceBranchManipulation() : base() { } 35 40 36 public ReplaceBranchManipulation()37 : base() {41 public override IDeepCloneable Clone(Cloner cloner) { 42 return new ReplaceBranchManipulation(this, cloner); 38 43 } 39 44 -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/SymbolicExpressionTreeManipulator.cs
r4068 r4722 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Data; … … 54 55 #endregion 55 56 57 [StorableConstructor] 58 protected SymbolicExpressionTreeManipulator(bool deserializing) : base(deserializing) { } 59 protected SymbolicExpressionTreeManipulator(SymbolicExpressionTreeManipulator original, Cloner cloner) : base(original, cloner) { } 56 60 public SymbolicExpressionTreeManipulator() 57 61 : base() {
Note: See TracChangeset
for help on using the changeset viewer.