Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/11/12 22:57:09 (11 years ago)
Author:
abeham
Message:

#1329:

  • Moved decoders and evaluators from encoding to problem
  • Removed unnecessary state variables in operators
  • Introduced parameters in interfaces and added wiring code
  • Removed ConcreteScheduleManipulator as it does not perform any manipulation
  • Made ErrorPolicy and ForcingStrategy configurable and added views for them
  • Renamed the SchedulingEvaluationAlgorithm and also converted the AlgorithmOperator to a SingleSuccessorOperator
  • Fixed Plugin- and AssemblyFileVersion
  • Added missing license headers
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Crossovers/PWRGOXCrossover.cs

    r8603 r8887  
    3131  [StorableClass]
    3232  public class PWRGOXCrossover : PWRCrossover {
     33
    3334    [StorableConstructor]
    3435    protected PWRGOXCrossover(bool deserializing) : base(deserializing) { }
    35     protected PWRGOXCrossover(PWRGOXCrossover original, Cloner cloner)
    36       : base(original, cloner) {
    37     }
     36    protected PWRGOXCrossover(PWRGOXCrossover original, Cloner cloner) : base(original, cloner) { }
     37    public PWRGOXCrossover() : base() { }
     38
    3839    public override IDeepCloneable Clone(Cloner cloner) {
    3940      return new PWRGOXCrossover(this, cloner);
    4041    }
    41     public PWRGOXCrossover() : base() { }
    4242
    4343    private static int[] GetLookUpForIndividual(List<int> p) {
    44       int[] result = new int[p.Count];
    45       Dictionary<int, int> lookUpTable = new Dictionary<int, int>();
     44      var result = new int[p.Count];
     45      var lookUpTable = new Dictionary<int, int>();
    4646
    4747      for (int i = 0; i < p.Count; i++) {
     
    5454      return result;
    5555    }
     56
    5657    public static PWREncoding Apply(IRandom random, PWREncoding parent1, PWREncoding parent2) {
    57       PWREncoding result = new PWREncoding();
     58      var result = new PWREncoding();
    5859
    59       List<int> p1 = ((IntegerVector)(parent1.PermutationWithRepetition.Clone())).ToList<int>();
    60       List<int> p2 = ((IntegerVector)(parent2.PermutationWithRepetition.Clone())).ToList<int>();
    61       List<int> child = new List<int>();
     60      var p1 = ((IntegerVector)(parent1.PermutationWithRepetition.Clone())).ToList();
     61      var p2 = ((IntegerVector)(parent2.PermutationWithRepetition.Clone())).ToList();
     62      var child = new List<int>();
    6263
    6364      int[] lookUpArrayP1 = GetLookUpForIndividual(p1);
     
    9091    }
    9192
    92 
    93 
    94 
    9593  }
    9694}
Note: See TracChangeset for help on using the changeset viewer.