Changeset 14695


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

#2457: small changes to MemPR

Location:
branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/Binary/BinaryMemPR.cs

    r14563 r14695  
    155155      var N = p1.Solution.Length;
    156156
    157       var probe = Context.ToScope((BinaryVector)p1.Solution.Clone());
     157      var probe = Context.ToScope(null);
    158158
    159159      var cache = new HashSet<BinaryVector>(new BinaryVectorEqualityComparer());
  • branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/LinearLinkage/LinearLinkageMemPR.cs

    r14563 r14695  
    253253      var cacheHits = new Dictionary<int, int>() { { 0, 0 }, { 1, 0 } };
    254254      var evaluations = 0;
    255       var probe = Context.ToScope((LinearLinkage)p1.Solution.Clone());
     255      var probe = Context.ToScope(null);
    256256      ISingleObjectiveSolutionScope<LinearLinkage> offspring = null;
    257257      while (evaluations < p1.Solution.Length) {
  • 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.