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