Changeset 813 for trunk/sources
- Timestamp:
- 11/24/08 22:43:05 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.GP/Recombination/UniformCrossover.cs
r807 r813 68 68 IScope parent2 = scope.SubScopes[0]; 69 69 scope.RemoveSubScope(parent2); 70 IScope child0 = new Scope((i *2).ToString());71 IScope child1 = new Scope((i *2+1).ToString());70 IScope child0 = new Scope((i * 2).ToString()); 71 IScope child1 = new Scope((i * 2 + 1).ToString()); 72 72 Cross(scope, random, gardener, parent1, parent2, child0, child1); 73 73 scope.AddSubScope(child0); … … 159 159 } 160 160 } 161 if (random.NextDouble() < 0.5) { 162 child0 = tree0; 163 child1 = tree1; 164 } else { 165 child0 = tree1; 166 child1 = tree0; 167 } 161 child0 = tree0; 162 child1 = tree1; 168 163 } 169 164
Note: See TracChangeset
for help on using the changeset viewer.