Changeset 17588 for branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/RandomExtensions.cs
- Timestamp:
- 06/05/20 14:47:55 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/VectorData/RandomExtensions.cs
r17448 r17588 37 37 return DoubleVector.Build.Dense(values); 38 38 } 39 40 public static DoubleVector NextIncreasingDoubleVector(this IRandom rand, double min, double max, int length) { 41 var values = new double[length]; 42 for (int i = 0; i < values.Length; i++) { 43 double offset = i * rand.NextDouble(); 44 values[i] = rand.NextDouble(min, max) + offset; 45 } 46 return DoubleVector.Build.Dense(values); 47 } 39 48 } 40 49 }
Note: See TracChangeset
for help on using the changeset viewer.