- Timestamp:
- 03/24/10 18:04:25 (15 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVectorEncoding/3.3/Manipulators/NormalAllPositionsManipulator.cs
r3206 r3207 36 36 /// The strategy vector can be of smaller length than the solution vector, in which case values are taken from the beginning again once the end of the strategy vector is reached. 37 37 /// </remarks> 38 [Item(" SelfAdaptiveNormalAllPositionsManipulator", "This manipulation operator adds a value sigma_i * N(0,1) to the current value in each position i. The values for sigma_i are taken from the strategy vector. It is implemented as described in Beyer, H.-G. and Schwefel, H.-P. 2002. Evolution Strategies - A Comprehensive Introduction Natural Computing, 1, pp. 3-52.")]38 [Item("NormalAllPositionsManipulator", "This manipulation operator adds a value sigma_i * N(0,1) to the current value in each position i. The values for sigma_i are taken from the strategy vector, if there are less elements in the strategy vector than positions, then the strategy vector is cycled. It is implemented as described in Beyer, H.-G. and Schwefel, H.-P. 2002. Evolution Strategies - A Comprehensive Introduction Natural Computing, 1, pp. 3-52.")] 39 39 [StorableClass] 40 public class SelfAdaptiveNormalAllPositionsManipulator : RealVectorManipulator {40 public class NormalAllPositionsManipulator : RealVectorManipulator { 41 41 /// <summary> 42 42 /// Parameter for the strategy vector. 43 43 /// </summary> 44 public LookupParameter<RealVector> StrategyVectorParameter {45 get { return ( LookupParameter<RealVector>)Parameters["StrategyVector"]; }44 public ValueLookupParameter<RealVector> StrategyVectorParameter { 45 get { return (ValueLookupParameter<RealVector>)Parameters["StrategyVector"]; } 46 46 } 47 47 /// <summary> 48 /// Initializes a new instance of <see cref=" SelfAdaptiveNormalAllPositionsManipulator"/> with one48 /// Initializes a new instance of <see cref="NormalAllPositionsManipulator"/> with one 49 49 /// parameter (<c>StrategyVector</c>). 50 50 /// </summary> 51 public SelfAdaptiveNormalAllPositionsManipulator()51 public NormalAllPositionsManipulator() 52 52 : base() { 53 Parameters.Add(new LookupParameter<RealVector>("StrategyVector", "The vector containing the endogenous strategy parameters."));53 Parameters.Add(new ValueLookupParameter<RealVector>("StrategyVector", "The vector containing the endogenous strategy parameters.")); 54 54 } 55 55 … … 77 77 /// <param name="realVector">The vector of real values that is manipulated.</param> 78 78 protected override void Manipulate(IRandom random, RealVector realVector) { 79 if (StrategyVectorParameter.ActualValue == null) throw new InvalidOperationException(" SelfAdaptiveNormalAllPositionsManipulator: Parameter " + StrategyVectorParameter.ActualName + " could not be found.");79 if (StrategyVectorParameter.ActualValue == null) throw new InvalidOperationException("NormalAllPositionsManipulator: The strategy vector parameter could not be found and does not have an associated value."); 80 80 Apply(random, realVector, StrategyVectorParameter.ActualValue); 81 81 }
Note: See TracChangeset
for help on using the changeset viewer.