Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/11/15 15:19:24 (8 years ago)
Author:
bwerth
Message:

#1087 extensive testing; fixed minor bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/DTLZ2.cs

    r13448 r13451  
    3636    public override bool[] Maximization {
    3737      get {
    38         bool[] res = new bool[actualSolutionSize];
    39         for(int i =0; i < res.Length; i++)  res[i] = false; //TODO: diligent initialzation
    40         return res;
     38        return new bool[actualSolutionSize];
    4139      }
    4240    }
     
    4846    }
    4947
    50     public override int MaximumSolutionSize { //TODO ask Michael
     48    public override int MaximumSolutionSize {
    5149      get {
     50
    5251        return int.MaxValue;
    5352      }
     
    5655    public override int MinimumProblemSize {
    5756      get {
    58         return Math.Max(2,actualSolutionSize);
     57        return Math.Max(2, ActualSolutionSize);
    5958      }
    6059    }
     
    8281
    8382    private double[] Evaluate(RealVector r, int objectives) {
     83      if (r.Length < objectives) {
     84        throw new Exception("The dimensionality of the problem(ProblemSize) must be larger or equal than the dimensionality of the solution(SolutionSize) ");
     85      }
     86
    8487      double[] res = new double[objectives];
    8588
Note: See TracChangeset for help on using the changeset viewer.