Changeset 8790 for trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Crossovers/RoundedUniformArithmeticCrossover.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/RoundedUniformArithmeticCrossover.cs
r8019 r8790 85 85 int min = bounds[i % bounds.Rows, 0], max = bounds[i % bounds.Rows, 1], step = 1; 86 86 if (bounds.Columns > 2) step = bounds[i % bounds.Rows, 2]; 87 max = FloorFeasible(min, max, step, max - 1); 87 88 double value = alpha.Value * parent1[i] + (1 - alpha.Value) * parent2[i]; 88 89 result[i] = RoundFeasible(min, max, step, value);
Note: See TracChangeset
for help on using the changeset viewer.