- Timestamp:
- 03/15/10 23:49:54 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.RealVector/3.3/Creators/UniformRandomRealVectorCreator.cs
r3017 r3048 51 51 /// <param name="max">The maximum value of the sampling range for each vector element (exclusive).</param> 52 52 /// <returns>The newly created real vector.</returns> 53 public static DoubleArray DataApply(IRandom random, int length, double min, double max) {53 public static DoubleArray Apply(IRandom random, int length, double min, double max) { 54 54 if (length <= 0) throw new ArgumentException("UniformRandomRealVectorCreator: Length is smaller or equal to 0.", "length"); 55 55 if (min > max) throw new ArgumentException("UniformRandomRealVectorCreator: Minimum is greater than Maximum.", "min"); 56 DoubleArray Data result = new DoubleArrayData(length);56 DoubleArray result = new DoubleArray(length); 57 57 for (int i = 0; i < length; i++) 58 58 result[i] = min + random.NextDouble() * (max - min); … … 68 68 /// <param name="maximum">The maximum value of the sampling range for each vector element (exclusive).</param> 69 69 /// <returns>The newly created real vector.</returns> 70 protected override DoubleArray Data Create(IRandom random, IntData length, DoubleData minimum, DoubleDatamaximum) {70 protected override DoubleArray Create(IRandom random, IntValue length, DoubleValue minimum, DoubleValue maximum) { 71 71 return Apply(random, length.Value, minimum.Value, maximum.Value); 72 72 }
Note: See TracChangeset
for help on using the changeset viewer.