Changeset 7715 for branches/IntegerVectorEncoding/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators/SelfAdaptiveRoundedNormalAllPositionsManipulator.cs
- Timestamp:
- 04/06/12 23:54:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/IntegerVectorEncoding/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators/SelfAdaptiveRoundedNormalAllPositionsManipulator.cs
r7686 r7715 90 90 91 91 int value = (vector[i] + (int)Math.Round((N.NextDouble() * strategyParameters[i % strategyParameters.Length])) - min) / step; 92 vector[i] = value * step + min;92 vector[i] = Math.Max(min, Math.Min(max, value * step + min)); 93 93 } 94 94 }
Note: See TracChangeset
for help on using the changeset viewer.