- Timestamp:
- 02/07/17 14:05:09 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistentDataStructures/HeuristicLab.Encodings.PermutationEncoding/3.3/Permutation.cs
r14186 r14650 71 71 public Permutation(PermutationTypes type, IntArray elements) 72 72 : this(type, elements.Length) { 73 for (int i = 0; i < array.Length; i++)74 array[i] = elements[i];73 for (int i = 0; i < historyArray.Length; i++) 74 historyArray[i] = elements[i]; 75 75 } 76 76 … … 103 103 index2 = startIndex + random.Next(i + 1); 104 104 if (index1 != index2) { 105 val = array[index1];106 array[index1] = array[index2];107 array[index2] = val;105 val = historyArray[index1]; 106 historyArray[index1] = historyArray[index2]; 107 historyArray[index2] = val; 108 108 } 109 109 }
Note: See TracChangeset
for help on using the changeset viewer.