Changeset 5015
- Timestamp:
- 12/03/10 15:17:25 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/MultiSymbolicExpressionTreeArchitectureManipulator.cs
r4722 r5015 116 116 manipulator.SymbolicExpressionGrammarParameter.ActualName = SymbolicExpressionGrammarParameter.Name; 117 117 manipulator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name; 118 manipulator.MaxFunctionDefinitionsParameter.ActualName = MaxFunction ArgumentsParameter.Name;118 manipulator.MaxFunctionDefinitionsParameter.ActualName = MaxFunctionDefinitionsParameter.Name; 119 119 manipulator.MaxFunctionArgumentsParameter.ActualName = MaxFunctionArgumentsParameter.Name; 120 120 } -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/ReplaceBranchManipulation.cs
r5014 r5015 57 57 int maxHeight = maxTreeHeight - symbolicExpressionTree.Height + manipulationPoint.Node.GetHeight(); 58 58 // find possible symbols for the node (also considering the existing branches below it) 59 var allowedSymbols = from symbol in manipulationPoint.Parent.GetAllowedSymbols(manipulationPoint.Index, maxHeight) 59 var allowedSymbols = from symbol in manipulationPoint.Parent.GetAllowedSymbols(manipulationPoint.Index) 60 where manipulationPoint.Node.Grammar.GetMinExpressionDepth(symbol) <= maxHeight 61 where manipulationPoint.Node.Grammar.GetMinExpressionLength(symbol) <= maxSize 60 62 select symbol; 61 63 if (allowedSymbols.Count() <= 1) return; -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeNode.cs
r5014 r5015 178 178 return Grammar.Symbols.Where(s => Grammar.IsAllowedChild(Symbol, s, argumentIndex)); 179 179 } 180 public IEnumerable<Symbol> GetAllowedSymbols(int argumentIndex, int maxExpressionDepth) {181 return Grammar.Symbols.Where(s => Grammar.IsAllowedChild(Symbol, s, argumentIndex) && Grammar.GetMinExpressionDepth(s) <= maxExpressionDepth);182 }183 180 184 181 public int GetMinSubtreeCount() {
Note: See TracChangeset
for help on using the changeset viewer.