Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/11 01:56:25 (13 years ago)
Author:
abeham
Message:

#1330

  • Added Swap2 move to permutation (+tabu search operators)
  • Added move evaluators for QAP (translocation/insertion missing)
  • Merged trunk-changes from Optimization into QAP branch
Location:
branches/QAP/HeuristicLab.Encodings.PermutationEncoding
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/QAP/HeuristicLab.Encodings.PermutationEncoding/3.3/Manipulators/Swap2Manipulator.cs

    r5445 r5785  
    4949    /// <param name="permutation">The permutation to manipulate.</param>
    5050    public static void Apply(IRandom random, Permutation permutation) {
    51       int index1, index2, temp;
     51      int index1, index2;
    5252
    5353      index1 = random.Next(permutation.Length);
    5454      index2 = random.Next(permutation.Length);
    5555
    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];
    5761      permutation[index1] = permutation[index2];
    5862      permutation[index2] = temp;
Note: See TracChangeset for help on using the changeset viewer.