Changeset 4189
- Timestamp:
- 08/11/10 11:06:51 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs
r4068 r4189 79 79 bool success = CreateFullTreeFromSeed(random, seedNode, seedNode.Grammar, treeSize, maxDepth, maxFunctionDefinitions, maxFunctionArguments); 80 80 81 // if successful l=> check constraints and return the tree if everything looks ok81 // if successful => check constraints and return the tree if everything looks ok 82 82 if (success && seedNode.GetSize() <= maxTreeSize && seedNode.GetHeight() <= maxDepth) { 83 83 return seedNode; -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj
r4065 r4189 130 130 <Compile Include="Manipulators\ChangeNodeTypeManipulation.cs" /> 131 131 <Compile Include="Interfaces\ISymbolicExpressionTreeManipulator.cs" /> 132 <Compile Include="Manipulators\ReplaceBranchManipulation.cs" /> 132 133 <Compile Include="Manipulators\FullTreeShaker.cs" /> 133 134 <Compile Include="Manipulators\MultiSymbolicExpressionTreeManipulator.cs" /> -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Manipulators/ChangeNodeTypeManipulation.cs
r4068 r4189 30 30 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Manipulators { 31 31 [StorableClass] 32 [Item("ChangeNodeTypeManipulation", "Selects a random tree node and changes the symbol size.")]32 [Item("ChangeNodeTypeManipulation", "Selects a random tree node and changes the symbol.")] 33 33 public class ChangeNodeTypeManipulation : SymbolicExpressionTreeManipulator { 34 34 … … 38 38 39 39 protected override void Manipulate(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, IntValue maxTreeSize, IntValue maxTreeHeight, out bool success) { 40 ChangeNodeType(random, symbolicExpressionTree, grammar, maxTreeSize.Value, maxTreeHeight.Value, out success); 41 } 40 42 41 // select any node except the with a parent where the parent is not the root node) 43 public static void ChangeNodeType(IRandom random, SymbolicExpressionTree symbolicExpressionTree, ISymbolicExpressionGrammar grammar, int maxTreeSize, int maxTreeHeight, out bool success) { 44 45 // select any node as parent (except the root node) 42 46 var manipulationPoint = (from parent in symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1) 43 47 from subtree in parent.SubTrees -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.Tests.csproj
r4065 r4189 101 101 <Compile Include="ArgumentDuplicaterTest.cs" /> 102 102 <Compile Include="AllArchitectureAlteringOperatorsTest.cs" /> 103 <Compile Include="ChangeNodeTypeManipulationTest.cs" /> 104 <Compile Include="ReplaceBranchManipulationTest.cs" /> 103 105 <Compile Include="SubroutineDeleterTest.cs" /> 104 106 <Compile Include="SubroutineDuplicaterTest.cs" />
Note: See TracChangeset
for help on using the changeset viewer.