Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/11/17 01:53:44 (8 years ago)
Author:
abeham
Message:

#2701:

  • fixed bug with breeding
  • fixed permutation sub-space hillclimber
  • improved speed of inversion by calling Array.Reverse(int, int) instead of using a for-loop
  • added delinking for relative-undirected permutations
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Permutation/LocalSearch/StaticAPI/Exhaustive2Opt.cs

    r14552 r14556  
    5555            continue;
    5656
    57           InversionManipulator.Apply(current, opt.Index1, opt.Index2);
     57          current.Reverse(opt.Index1, opt.Index2 - opt.Index1 + 1);
    5858          var q = eval(current, token);
    5959          evaluations++;
     
    6262            quality = q;
    6363            lastSuccessMove = opt;
    64           } else InversionManipulator.Apply(current, opt.Index1, opt.Index2);
     64          } else current.Reverse(opt.Index1, opt.Index2 - opt.Index1 + 1);
    6565
    6666          if (token.IsCancellationRequested) {
Note: See TracChangeset for help on using the changeset viewer.