Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/03/14 17:14:56 (10 years ago)
Author:
bgoldman
Message:

#2282 Implemented DeceptiveTrapProblem and IsBetter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/Problems/BinaryVectorProblem.cs

    r11636 r11640  
    4848    protected BinaryVectorProblem(bool deserializing) : base(deserializing) { }
    4949    protected BinaryVectorProblem(BinaryVectorProblem original, Cloner cloner) : base(original, cloner) { }
     50    public bool IsBetter(double quality, double bestQuality) {
     51      return (Maximization && quality > bestQuality || !Maximization && quality < bestQuality);
     52    }
    5053
    5154    public BinaryVectorProblem()
    5255      : base() {
    53       Parameters.Add(new FixedValueParameter<IntValue>(LengthParameterName, "", new IntValue(5)));
     56      Parameters.Add(new FixedValueParameter<IntValue>(LengthParameterName, "", new IntValue(20)));
    5457    }
    5558
Note: See TracChangeset for help on using the changeset viewer.