- Timestamp:
- 04/30/10 10:30:24 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs
r3539 r3569 30 30 using HeuristicLab.Data; 31 31 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces; 32 using HeuristicLab.PluginInfrastructure; 32 33 33 34 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ArchitectureManipulators { … … 88 89 Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionGrammarParameterName, "The grammar that defines the allowed symbols and syntax of the symbolic expression trees.")); 89 90 90 Operators.Add(new ArgumentCreater()); 91 Operators.Add(new ArgumentDeleter()); 92 Operators.Add(new ArgumentDuplicater()); 93 Operators.Add(new SubroutineCreater()); 94 Operators.Add(new SubroutineDeleter()); 95 Operators.Add(new SubroutineDuplicater()); 91 foreach (var availableOperatorType in ApplicationManager.Manager.GetTypes(typeof(ISymbolicExpressionTreeArchitectureManipulator))) { 92 if (availableOperatorType != this.GetType()) 93 Operators.Add((ISymbolicExpressionTreeArchitectureManipulator)Activator.CreateInstance(availableOperatorType), true); 94 } 96 95 } 97 96 … … 121 120 } 122 121 123 public override IOperation Apply() {124 if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one symbolic expression tree architecture manipulator to choose from.");125 return base.Apply();126 }127 128 122 #region ISymbolicExpressionTreeArchitectureManipulator Members 129 123 public void ModifyArchitecture(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, IntValue maxTreeSize, IntValue maxTreeHeight, IntValue maxFunctionDefiningBranches, IntValue maxFunctionArguments, out bool success) { -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
r3534 r3569 30 30 using HeuristicLab.Data; 31 31 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces; 32 using HeuristicLab.PluginInfrastructure; 32 33 33 34 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators { … … 75 76 Parameters.Add(new LookupParameter<ISymbolicExpressionGrammar>(SymbolicExpressionGrammarParameterName, "The grammar that defines the allowed symbols and syntax of the symbolic expression trees.")); 76 77 77 Operators.Add(new FullTreeShaker()); 78 Operators.Add(new OnePointShaker()); 79 Operators.Add(new ChangeNodeTypeManipulation()); 78 foreach (var availableOperatorType in ApplicationManager.Manager.GetTypes(typeof(ISymbolicExpressionTreeArchitectureManipulator))) { 79 if (availableOperatorType != this.GetType()) 80 Operators.Add((ISymbolicExpressionTreeArchitectureManipulator)Activator.CreateInstance(availableOperatorType), true); 81 } 80 82 } 81 83 … … 102 104 } 103 105 } 104 105 public override IOperation Apply() {106 if (Operators.Count == 0) throw new InvalidOperationException(Name + ": Please add at least one symbolic expression tree manipulator to choose from.");107 return base.Apply();108 }109 106 } 110 107 }
Note: See TracChangeset
for help on using the changeset viewer.