Changeset 7715
 Timestamp:
 04/06/12 23:54:30 (12 years ago)
 Location:
 branches/IntegerVectorEncoding/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators
 Files:

 2 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 } 
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.