Ignore:
Timestamp:
11/24/15 16:01:02 (4 years ago)
Author:
mkommend
Message:

#2521: Adapted real vector encoding, test function problems, P3, CMA-ES and optimization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ProblemRefactoring/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs

    r13339 r13361  
    4545      get { return typeof(ISingleObjectiveProblem<BinaryVectorEncoding, BinaryVector>); }
    4646    }
    47     public new ISingleObjectiveProblem<BinaryVectorEncoding, BinaryVector> Problem {
    48       get { return (ISingleObjectiveProblem<BinaryVectorEncoding, BinaryVector>)base.Problem; }
    49       set { base.Problem = value; }
     47    public new ISingleObjectiveProblemDefinition<BinaryVectorEncoding, BinaryVector> Problem {
     48      get { return (ISingleObjectiveProblemDefinition<BinaryVectorEncoding, BinaryVector>)base.Problem; }
     49      set { base.Problem = (IProblem)value; }
    5050    }
    5151
     
    182182      if (seen.Contains(solution)) return;
    183183      if (level == pyramid.Count) {
    184         pyramid.Add(new Population(tracker.Encoding.Length, random));
     184        pyramid.Add(new Population(Problem.Encoding.Length, random));
    185185      }
    186186      var copied = (BinaryVector)solution.Clone();
     
    192192    private double iterate() {
    193193      // Create a random solution
    194       BinaryVector solution = new BinaryVector(tracker.Encoding.Length);
     194      BinaryVector solution = new BinaryVector(Problem.Encoding.Length);
    195195      for (int i = 0; i < solution.Length; i++) {
    196196        solution[i] = random.Next(2) == 1;
Note: See TracChangeset for help on using the changeset viewer.