- Timestamp:
- 04/02/11 23:13:33 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.PermutationEncoding
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding
-
Property
svn:mergeinfo
set to
/branches/QAP/HeuristicLab.Encodings.PermutationEncoding merged eligible
-
Property
svn:mergeinfo
set to
-
trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs
r5445 r5933 49 49 /// <param name="permutation">The permutation to manipulate.</param> 50 50 public static void Apply(IRandom random, Permutation permutation) { 51 int index1, index2 , temp;51 int index1, index2; 52 52 53 53 index1 = random.Next(permutation.Length); 54 54 index2 = random.Next(permutation.Length); 55 55 56 temp = permutation[index1]; 56 Apply(permutation, index1, index2); 57 } 58 59 public static void Apply(Permutation permutation, int index1, int index2) { 60 int temp = permutation[index1]; 57 61 permutation[index1] = permutation[index2]; 58 62 permutation[index2] = temp;
Note: See TracChangeset
for help on using the changeset viewer.