Changeset 12515 for branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers
- Timestamp:
- 06/25/15 18:21:19 (10 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding (added) merged: 12480,12509
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs
r12422 r12515 135 135 parent0.Root.ForEachNodePostfix((n) => { 136 136 if (n.SubtreeCount > 0 && n != parent0.Root) { 137 foreach (var child in n.Subtrees) { 137 //avoid linq to reduce memory pressure 138 for (int i = 0; i < n.SubtreeCount; i++) { 139 var child = n.GetSubtree(i); 138 140 if (child.GetLength() <= maxBranchLength && 139 141 child.GetDepth() <= maxBranchDepth) { -
branches/HiveStatistics/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SymbolicExpressionTreeCrossover.cs
r12422 r12515 68 68 69 69 public abstract ISymbolicExpressionTree Crossover(IRandom random, ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1); 70 71 72 [StorableHook(HookType.AfterDeserialization)] 73 private void AfterDeserialization() { 74 // BackwardsCompatibility3.4 75 #region Backwards compatible code, remove with 3.5 76 if (Parameters.ContainsKey("Child")) { 77 var oldChildParameter = (ILookupParameter<ISymbolicExpressionTree>)Parameters["Child"]; 78 Parameters.Remove("Child"); 79 SymbolicExpressionTreeParameter.ActualName = oldChildParameter.ActualName; 80 } 81 #endregion 82 } 70 83 } 71 84 }
Note: See TracChangeset
for help on using the changeset viewer.