Changeset 1184 for trunk/sources/HeuristicLab.RealVector/SelfAdaptiveNormalAllPositionsManipulator.cs
- Timestamp:
- 01/28/09 10:20:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.RealVector/SelfAdaptiveNormalAllPositionsManipulator.cs
r1180 r1184 28 28 29 29 namespace HeuristicLab.RealVector { 30 /// <summary> 31 /// Manipulates each dimension in the real vector with the mutation strength given 32 /// in the strategy parameter vector. 33 /// </summary> 30 34 public class SelfAdaptiveNormalAllPositionsManipulator : RealVectorManipulatorBase { 35 /// <inheritdoc select="summary"/> 31 36 public override string Description { 32 37 get { return @"Manipulates each dimension in the real vector with the mutation strength given in the strategy parameter vector"; } 33 38 } 34 39 40 /// <summary> 41 /// Initializes a new instance of <see cref="SelfAdaptiveNormalAllPositionsManipulator"/> with one 42 /// variable info (<c>StrategyVector</c>). 43 /// </summary> 35 44 public SelfAdaptiveNormalAllPositionsManipulator() 36 45 : base() { … … 38 47 } 39 48 49 /// <summary> 50 /// Performs a self adaptive normally distributed all position manipulation on the given 51 /// <paramref name="vector"/>. 52 /// </summary> 53 /// <exception cref="InvalidOperationException">Thrown when the strategy vector is not 54 /// as long as the vector to get manipulated.</exception> 55 /// <param name="strategyParameters">The strategy vector determining the strength of the mutation.</param> 56 /// <param name="random">A random number generator.</param> 57 /// <param name="vector">The real vector to manipulate.</param> 58 /// <returns>The manipulated real vector.</returns> 40 59 public static double[] Apply(double[] strategyParameters, IRandom random, double[] vector) { 41 60 NormalDistributedRandom N = new NormalDistributedRandom(random, 0.0, 1.0); … … 46 65 } 47 66 67 /// <summary> 68 /// Performs a self adaptive normally distributed all position manipulation on the given 69 /// <paramref name="vector"/>. 70 /// </summary> 71 /// <remarks>Calls <see cref="Apply"/>.</remarks> 72 /// <param name="scope">The current scope.</param> 73 /// <param name="random">A random number generator.</param> 74 /// <param name="vector">The real vector to manipulate.</param> 75 /// <returns>The manipulated real vector.</returns> 48 76 protected override double[] Manipulate(IScope scope, IRandom random, double[] vector) { 49 77 double[] strategyVector = scope.GetVariableValue<DoubleArrayData>("StrategyVector", true).Data;
Note: See TracChangeset
for help on using the changeset viewer.