Changeset 8331 for branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Timestamp:
- 07/26/12 09:51:13 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding merged: 8126,8148,8246,8311
- Property svn:mergeinfo changed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineCreater.cs
r7259 r8331 139 139 // the grammar in the newly defined function is a clone of the grammar of the originating branch 140 140 defunNode.SetGrammar((ISymbolicExpressionTreeGrammar)selectedBody.Grammar.Clone()); 141 142 var allowedChildSymbols = selectedBody.Grammar.GetAllowedChildSymbols(selectedBody.Symbol); 143 foreach (var allowedChildSymbol in allowedChildSymbols) 144 defunNode.Grammar.AddAllowedChildSymbol(defunNode.Symbol, allowedChildSymbol); 145 var maxSubtrees = selectedBody.Grammar.GetMaximumSubtreeCount(selectedBody.Symbol); 146 for (int i = 0; i < maxSubtrees; i++) { 147 foreach (var allowedChildSymbol in selectedBody.Grammar.GetAllowedChildSymbols(selectedBody.Symbol, i)) 148 defunNode.Grammar.AddAllowedChildSymbol(defunNode.Symbol, allowedChildSymbol); 149 } 150 141 151 // remove all argument symbols from grammar except that one contained in cutpoints 142 152 var oldArgumentSymbols = selectedBody.Grammar.Symbols.OfType<Argument>().ToList(); -
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs
r7259 r8331 73 73 symbolicExpressionTree.Root.AddSubtree(duplicatedDefunBranch); 74 74 duplicatedDefunBranch.SetGrammar((ISymbolicExpressionTreeGrammar)selectedBranch.Grammar.Clone()); 75 76 var allowedChildSymbols = selectedBranch.Grammar.GetAllowedChildSymbols(selectedBranch.Symbol); 77 foreach (var allowedChildSymbol in allowedChildSymbols) 78 duplicatedDefunBranch.Grammar.AddAllowedChildSymbol(duplicatedDefunBranch.Symbol, allowedChildSymbol); 79 var maxSubtrees = selectedBranch.Grammar.GetMaximumSubtreeCount(selectedBranch.Symbol); 80 for (int i = 0; i < maxSubtrees; i++) { 81 foreach (var allowedChildSymbol in selectedBranch.Grammar.GetAllowedChildSymbols(selectedBranch.Symbol, i)) 82 duplicatedDefunBranch.Grammar.AddAllowedChildSymbol(duplicatedDefunBranch.Symbol, allowedChildSymbol); 83 } 84 75 85 // add an invoke symbol for each branch that is allowed to invoke the original function 76 86 foreach (var subtree in symbolicExpressionTree.Root.Subtrees.OfType<SymbolicExpressionTreeTopLevelNode>()) { -
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs
r7259 r8331 176 176 extensionPoints.Add(x); 177 177 } 178 long minExtensionPointsLength = extensionPoints.Select(x => x.MinimumExtensionLength).Sum(); 179 long maxExtensionPointsLength = extensionPoints.Select(x => x.MaximumExtensionLength).Sum(); 178 //necessary to use long data type as the extension point length could be int.MaxValue 179 long minExtensionPointsLength = extensionPoints.Select(x => (long)x.MinimumExtensionLength).Sum(); 180 long maxExtensionPointsLength = extensionPoints.Select(x => (long)x.MaximumExtensionLength).Sum(); 180 181 181 182 // while there are pending extension points and we have not reached the limit of adding new extension points -
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame
r7259 r8331 26 26 27 27 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 28 [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","Provides operators and related classes for the symbolic expression tree encoding.", "3.4. 2.$WCREV$")]28 [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","Provides operators and related classes for the symbolic expression tree encoding.", "3.4.3.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Properties/AssemblyInfo.cs.frame
r7259 r8331 45 45 46 46 [assembly: AssemblyVersion("3.4.0.0")] 47 [assembly: AssemblyFileVersion("3.4. 2.$WCREV$")]47 [assembly: AssemblyFileVersion("3.4.3.$WCREV$")] -
branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTree.cs
r8086 r8331 23 23 using System.Collections.Generic; 24 24 using System.Drawing; 25 using System.Linq; 25 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; … … 77 78 public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesBreadth() { 78 79 if (root == null) 79 return new SymbolicExpressionTreeNode[0];80 return Enumerable.Empty<SymbolicExpressionTreeNode>(); 80 81 return root.IterateNodesBreadth(); 81 82 } … … 83 84 public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPrefix() { 84 85 if (root == null) 85 return new SymbolicExpressionTreeNode[0];86 return Enumerable.Empty<SymbolicExpressionTreeNode>(); 86 87 return root.IterateNodesPrefix(); 87 88 } 88 89 public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesPostfix() { 89 90 if (root == null) 90 return new SymbolicExpressionTreeNode[0];91 return Enumerable.Empty<SymbolicExpressionTreeNode>(); 91 92 return root.IterateNodesPostfix(); 92 93 }
Note: See TracChangeset
for help on using the changeset viewer.