- Timestamp:
- 07/30/09 10:47:00 (15 years ago)
- Location:
- branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators
- Files:
-
- 2 added
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/Manipulation/ChangeNodeTypeManipulation.cs
r2211 r2212 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using System.Linq; 25 using System.Text;26 24 using HeuristicLab.Core; 27 using HeuristicLab.Operators;28 25 using HeuristicLab.Random; 29 using HeuristicLab.Data;30 using HeuristicLab.Constraints;31 26 using System.Diagnostics; 32 27 using HeuristicLab.GP.Interfaces; 33 28 34 namespace HeuristicLab.GP {29 namespace HeuristicLab.GP.Operators { 35 30 public class ChangeNodeTypeManipulation : GPManipulatorBase { 36 31 … … 73 68 // size and height stays the same when changing a terminal so no need to update the variables 74 69 // schedule an operation to initialize the new terminal 75 return TreeGardener.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTerminal), scope);70 return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTerminal), scope); 76 71 } else { 77 72 List<IFunctionTree> uninitializedBranches; … … 104 99 Debug.Assert(gardener.IsValidTree(gpModel.FunctionTree)); 105 100 // return a composite operation that initializes all created sub-trees 106 return TreeGardener.CreateInitializationOperation(uninitializedBranches, scope);101 return Util.CreateInitializationOperation(uninitializedBranches, scope); 107 102 } 108 103 } -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/Manipulation/CutOutNodeManipulation.cs
r2210 r2212 23 23 using System.Linq; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Data;26 using HeuristicLab.Operators;27 25 using HeuristicLab.Random; 28 using System;29 26 using System.Diagnostics; 30 27 using HeuristicLab.GP.Interfaces; 31 28 32 namespace HeuristicLab.GP {29 namespace HeuristicLab.GP.Operators { 33 30 public class CutOutNodeManipulation : GPManipulatorBase { 34 31 public override string Description { … … 71 68 72 69 // schedule an operation to initialize the whole tree 73 return TreeGardener.CreateInitializationOperation(TreeGardener.GetAllSubTrees(gpModel.FunctionTree), scope);70 return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(gpModel.FunctionTree), scope); 74 71 } 75 72 } … … 108 105 gpModel.Height = gpModel.FunctionTree.GetHeight(); 109 106 // schedule an initialization operation for the new function-tree 110 return TreeGardener.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope);107 return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope); 111 108 } 112 109 } -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/Manipulation/DeleteSubTreeManipulation.cs
r2211 r2212 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 23 using HeuristicLab.Core; 25 using HeuristicLab.Data;26 using HeuristicLab.Operators;27 24 using HeuristicLab.Random; 28 25 using System.Diagnostics; 29 26 using HeuristicLab.GP.Interfaces; 30 27 31 namespace HeuristicLab.GP {28 namespace HeuristicLab.GP.Operators { 32 29 public class DeleteSubTreeManipulation : GPManipulatorBase { 33 30 public override string Description { … … 54 51 gpModel.FunctionTree = newTree; 55 52 // schedule an operation to initialize the newly created operator 56 return TreeGardener.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);53 return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope); 57 54 } 58 55 … … 84 81 gpModel.Height = gpModel.FunctionTree.GetHeight(); 85 82 // return an initialization operation for the newly created tree 86 return TreeGardener.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope);83 return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newFunctionTree), scope); 87 84 } 88 85 } -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/Manipulation/FullTreeShaker.cs
r2210 r2212 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 22 using System.Linq; 25 using System.Text;26 23 using HeuristicLab.Core; 27 24 using HeuristicLab.Operators; 28 25 using HeuristicLab.Random; 29 26 using HeuristicLab.Data; 27 using HeuristicLab.GP.Interfaces; 30 28 using HeuristicLab.Selection; 31 using HeuristicLab.GP.Interfaces;32 29 33 namespace HeuristicLab.GP {30 namespace HeuristicLab.GP.Operators { 34 31 public class FullTreeShaker : DelegatingOperator { 35 32 public override string Description { -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/Manipulation/GPManipulatorBase.cs
r2210 r2212 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 22 using HeuristicLab.Core; 27 using HeuristicLab.Operators;28 23 using HeuristicLab.Random; 29 24 using HeuristicLab.Data; 30 using HeuristicLab.Constraints;31 using System.Diagnostics;32 using HeuristicLab.Evolutionary;33 25 using HeuristicLab.GP.Interfaces; 34 26 35 namespace HeuristicLab.GP {27 namespace HeuristicLab.GP.Operators { 36 28 public abstract class GPManipulatorBase : OperatorBase { 37 29 public GPManipulatorBase() -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/Manipulation/OnePointShaker.cs
r2210 r2212 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 22 using System.Linq; 25 using System.Text;26 23 using HeuristicLab.Core; 27 24 using HeuristicLab.Operators; … … 31 28 using HeuristicLab.GP.Interfaces; 32 29 33 namespace HeuristicLab.GP {30 namespace HeuristicLab.GP.Operators { 34 31 public class OnePointShaker : DelegatingOperator { 35 32 public override string Description { -
branches/GP-Refactoring-713/sources/HeuristicLab.GP.Operators/3.3/Manipulation/SubstituteSubTreeManipulation.cs
r2210 r2212 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq;25 24 using HeuristicLab.Core; 26 using HeuristicLab.Data;27 using HeuristicLab.Operators;28 25 using HeuristicLab.Random; 29 26 using System.Diagnostics; 30 27 using HeuristicLab.GP.Interfaces; 31 28 32 namespace HeuristicLab.GP {29 namespace HeuristicLab.GP.Operators { 33 30 public class SubstituteSubTreeManipulation : GPManipulatorBase { 34 31 … … 52 49 gpModel.FunctionTree = newTree; 53 50 // return a CompositeOperation that randomly initializes the new tree 54 return TreeGardener.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);51 return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope); 55 52 } else { 56 53 // determine a random child of the parent to be replaced … … 81 78 // the root hasn't changed so we don't need to update 82 79 // return a CompositeOperation that randomly initializes all nodes of the new subtree 83 return TreeGardener.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope);80 return Util.CreateInitializationOperation(TreeGardener.GetAllSubTrees(newTree), scope); 84 81 } 85 82 }
Note: See TracChangeset
for help on using the changeset viewer.