Changeset 7799 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Timestamp:
- 05/11/12 17:29:55 (13 years ago)
- Location:
- branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs
r7792 r7799 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.77 88")]28 [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","Provides operators and related classes for the symbolic expression tree encoding.", "3.4.2.7792")] 29 29 [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeNode.cs
r7792 r7799 173 173 174 174 public IEnumerable<ISymbolicExpressionTreeNode> IterateNodesBreadth() { 175 var list = new List<ISymbolicExpressionTreeNode>(GetLength()) { this }; 176 int offset = 0, count = 1; 177 while (offset != count) { 178 var c = count; 179 for (int i = offset; i != count; ++i) 180 if (list[i].SubtreeCount > 0) 181 list.AddRange(list[i].Subtrees); 182 offset = c; 183 count = list.Count; 175 var list = new List<ISymbolicExpressionTreeNode>() { this }; 176 int i = 0; 177 while (i != list.Count) { 178 for (int j = 0; j != list[i].SubtreeCount; ++j) 179 list.Add(list[i].GetSubtree(j)); 180 ++i; 184 181 } 185 182 return list;
Note: See TracChangeset
for help on using the changeset viewer.