Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/27/14 20:02:35 (10 years ago)
Author:
mkommend
Message:

#2174: Added first version of refactored individuals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/Operators/SingleObjectiveMoveGenerator.cs

    r11559 r11598  
    7373      var sampleSize = SampleSizeParameter.ActualValue.Value;
    7474      var encoding = EncodingParameter.ActualValue;
    75       var vector = Helper.Extract(ExecutionContext.Scope, encoding);
    76       var nbhood = definition.GetNeighbors(random, vector).Take(sampleSize).ToList();
     75      var individual = encoding.CreateIndividual(ExecutionContext.Scope);
     76      var nbhood = definition.GetNeighbors(random, individual).Take(sampleSize).ToList();
    7777
    7878      var moveScopes = new Scope[nbhood.Count];
    7979      for (int i = 0; i < moveScopes.Length; i++) {
    8080        moveScopes[i] = new Scope(i.ToString(CultureInfo.InvariantCulture.NumberFormat));
    81         Helper.Write(moveScopes[i], nbhood[i]);
     81        nbhood[i].Copy(moveScopes[i]);
    8282      }
    8383      ExecutionContext.Scope.SubScopes.AddRange(moveScopes);
Note: See TracChangeset for help on using the changeset viewer.