Changeset 1196 for branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP/Recombination/SizeFairCrossOver.cs
- Timestamp:
- 02/02/09 12:45:08 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CEDMA-Refactoring-Ticket419/HeuristicLab.GP/Recombination/SizeFairCrossOver.cs
r835 r1196 39 39 /// </summary> 40 40 public class SizeFairCrossOver : SizeConstrictedGPCrossoverBase { 41 private const int MAX_RECOMBINATION_TRIES = 20;41 private int MaxRecombinationTries { get { return 20; } } 42 42 // private data structure for crossover points 43 43 protected class CrossoverPoint { … … 57 57 removedBranchIndex = random.Next(parent.SubTrees.Count); 58 58 insertedBranch = GetReplacementBranch(random, gardener, tree0, parent, removedBranchIndex, tree1, maxTreeSize, maxTreeHeight); 59 } while (insertedBranch == null && tries++ < M AX_RECOMBINATION_TRIES);59 } while (insertedBranch == null && tries++ < MaxRecombinationTries); 60 60 61 61 if (insertedBranch != null) { … … 139 139 for (int i = 0; i < root.SubTrees.Count; i++) { 140 140 GetTrail(root.SubTrees[i], branch, trail); 141 if (trail.Count >0) {141 if (trail.Count > 0) { 142 142 trail.Add(i); 143 143 return;
Note: See TracChangeset
for help on using the changeset viewer.