- Timestamp:
- 03/16/10 10:35:28 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/Manipulators/UniformOnePositionManipulator.cs
r3053 r3059 32 32 /// Uniformly distributed change of a single position of an integer vector. 33 33 /// </summary> 34 /// It is implemented as described in Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg.35 34 /// <remarks> 36 35 /// It is implemented as described in Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg. … … 38 37 [Item("UniformOnePositionManipulator", " Uniformly distributed change of a single position of an integer vector. It is implemented as described in Michalewicz, Z. 1999. Genetic Algorithms + Data Structures = Evolution Programs. Third, Revised and Extended Edition, Spring-Verlag Berlin Heidelberg.")] 39 38 [StorableClass] 40 public class UniformOnePositionManipulator : Int VectorManipulator {39 public class UniformOnePositionManipulator : IntegerVectorManipulator { 41 40 /// <summary> 42 41 /// The lower bound of the values in the int vector. … … 70 69 /// <param name="max">The maximum value of the sampling range for 71 70 /// the vector element to change (exclusive).</param> 72 public static void Apply(IRandom random, Int Arrayvector, IntValue min, IntValue max) {71 public static void Apply(IRandom random, IntegerVector vector, IntValue min, IntValue max) { 73 72 int index = random.Next(vector.Length); 74 73 vector[index] = random.Next(min.Value, max.Value); … … 81 80 /// <param name="random">A random number generator.</param> 82 81 /// <param name="vector">The integer vector to manipulate.</param> 83 protected override void Manipulate(IRandom random, Int Arrayvector) {82 protected override void Manipulate(IRandom random, IntegerVector vector) { 84 83 if (MinimumParameter.ActualValue == null) throw new InvalidOperationException("UniformOnePositionManipulator: Parameter " + MinimumParameter.ActualName + " could not be found."); 85 84 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.