Changeset 3060 for trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs
- Timestamp:
- 03/16/10 10:46:59 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs
r3053 r3060 67 67 /// <param name="max">The maximum value of the sampling range for 68 68 /// the vector element to change (exclusive).</param> 69 public static void Apply(IRandom random, DoubleArrayvector, DoubleValue min, DoubleValue max) {69 public static void Apply(IRandom random, RealVector vector, DoubleValue min, DoubleValue max) { 70 70 int index = random.Next(vector.Length); 71 71 vector[index] = min.Value + random.NextDouble() * (max.Value - min.Value); … … 73 73 74 74 /// <summary> 75 /// Checks if the minimum and maximum parameters are available and forwards the call to <see cref="Apply(IRandom, DoubleArray, DoubleValue, DoubleValue)"/>.75 /// Checks if the minimum and maximum parameters are available and forwards the call to <see cref="Apply(IRandom, RealVector, DoubleValue, DoubleValue)"/>. 76 76 /// </summary> 77 77 /// <param name="random">The random number generator to use.</param> 78 78 /// <param name="realVector">The real vector to manipulate.</param> 79 protected override void Manipulate(IRandom random, DoubleArrayrealVector) {79 protected override void Manipulate(IRandom random, RealVector realVector) { 80 80 if (MinimumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MinimumParameter.ActualName + " could not be found."); 81 81 if (MaximumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MaximumParameter.ActualName + " could not be found.");
Note: See TracChangeset
for help on using the changeset viewer.