Changeset 1180
- Timestamp:
- 01/27/09 14:25:47 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.RealVector/SelfAdaptiveNormalAllPositionsManipulator.cs
r99 r1180 40 40 public static double[] Apply(double[] strategyParameters, IRandom random, double[] vector) { 41 41 NormalDistributedRandom N = new NormalDistributedRandom(random, 0.0, 1.0); 42 if (strategyParameters.Length != vector.Length)43 throw new InvalidOperationException("ERROR: Strategy Vector must be as long as parameter vector");44 42 for (int i = 0; i < vector.Length; i++) { 45 vector[i] = vector[i] + (N.NextDouble() * strategyParameters[i ]);43 vector[i] = vector[i] + (N.NextDouble() * strategyParameters[i % strategyParameters.Length]); 46 44 } 47 45 return vector;
Note: See TracChangeset
for help on using the changeset viewer.