Changeset 14650 for branches/PersistentDataStructures/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs
- Timestamp:
- 02/07/17 14:05:09 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistentDataStructures/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVector.cs
r14186 r14650 41 41 public RealVector(DoubleArray elements) 42 42 : this(elements.Length) { 43 for (int i = 0; i < array.Length; i++)44 array[i] = elements[i];43 for (int i = 0; i < historyArray.Length; i++) 44 historyArray[i] = elements[i]; 45 45 } 46 46 … … 53 53 if (length > 0) { 54 54 for (int i = 0; i < length; i++) 55 array[startIndex + i] = min + delta * random.NextDouble();55 historyArray[startIndex + i] = min + delta * random.NextDouble(); 56 56 OnReset(); 57 57 } … … 63 63 double min = bounds[i % bounds.Rows, 0]; 64 64 double max = bounds[i % bounds.Rows, 1]; 65 array[i] = min + (max - min) * random.NextDouble();65 historyArray[i] = min + (max - min) * random.NextDouble(); 66 66 } 67 67 OnReset();
Note: See TracChangeset
for help on using the changeset viewer.