Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/23/17 14:29:10 (8 years ago)
Author:
abeham
Message:

#2457: small changes to MemPR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/Permutation/PermutationMemPR.cs

    r14678 r14695  
    258258      if (!overallImprovement && bestOfTheWalk != null) {
    259259        quality = bestOfTheWalkF;
    260         for (var i = 0; i < current.Length; i++) perm[i] = bestOfTheWalk[i];
     260        perm.Replace(0, bestOfTheWalk.ToArray());
    261261      }
    262262      return stepsUntilBestOfWalk;
     
    403403      var evaluations = 0;
    404404      ISingleObjectiveSolutionScope<Encodings.PermutationEncoding.Permutation> offspring = null;
    405       var probe = Context.ToScope((Encodings.PermutationEncoding.Permutation)p1.Solution.Clone());
     405      var probe = Context.ToScope(null);
    406406      while (evaluations < p1.Solution.Length) {
    407407        Encodings.PermutationEncoding.Permutation c = null;
     
    442442      var evaluations = 0;
    443443      ISingleObjectiveSolutionScope<Encodings.PermutationEncoding.Permutation> offspring = null;
    444       var probe = Context.ToScope((Encodings.PermutationEncoding.Permutation)p1.Solution.Clone());
     444      var probe = Context.ToScope(null);
    445445      while (evaluations < p1.Solution.Length) {
    446446        Encodings.PermutationEncoding.Permutation c = null;
     
    481481      var evaluations = 0;
    482482      ISingleObjectiveSolutionScope<Encodings.PermutationEncoding.Permutation> offspring = null;
    483       var probe = Context.ToScope((Encodings.PermutationEncoding.Permutation)p1.Solution.Clone());
     483      var probe = Context.ToScope(null);
    484484      while (evaluations <= p1.Solution.Length) {
    485485        Encodings.PermutationEncoding.Permutation c = null;
Note: See TracChangeset for help on using the changeset viewer.