Changeset 7997 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators
- Timestamp:
- 06/13/12 13:20:38 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/TracingSymbolicExpressionTreeManipulator.cs
r7792 r7997 21 21 22 22 using System; 23 using System. Linq;23 using System.Collections.Generic; 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Core; 26 using HeuristicLab. Data;26 using HeuristicLab.EvolutionaryTracking; 27 27 using HeuristicLab.Parameters; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 109 109 GlobalTraceMap[tree] = new ItemList<IItem> { original }; 110 110 } 111 var nodes0 = tree.IterateNodesBreadth() .ToList();111 var nodes0 = tree.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>; 112 112 Manipulate(RandomParameter.ActualValue, tree); 113 var nodes1 = tree.IterateNodesBreadth() .ToList();113 var nodes1 = tree.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>; 114 114 int i, min = Math.Max(nodes0.Count, nodes1.Count); 115 115 for (i = 0; i != min; ++i) 116 116 if (nodes0[i] != nodes1[i]) break; 117 117 if (i == min) i = 0; 118 GlobalFragmentMap[tree] = new IntValue(i);118 GlobalFragmentMap[tree] = new GenericWrapper<ISymbolicExpressionTreeNode>(nodes1[i]); 119 119 120 120 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.