Changeset 8790 for trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedLocalCrossover.cs
- Timestamp:
- 10/11/12 13:37:56 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedLocalCrossover.cs
r8019 r8790 64 64 max = bounds[i % bounds.Rows, 1]; 65 65 if (bounds.Columns > 2) step = bounds[i % bounds.Rows, 2]; 66 max = FloorFeasible(min, max, step, max - 1); 66 67 factor = random.NextDouble(); 67 68 result[i] = RoundFeasible(min, max, step, (factor * parent1[i]) + ((1 - factor) * parent2[i]));
Note: See TracChangeset
for help on using the changeset viewer.