Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/14/16 14:33:15 (8 years ago)
Author:
mkommend
Message:

#1087: Added checks for min and max objectives to testfunctions.

File:
1 edited

Legend:

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

    r14065 r14068  
    170170    /// <param name="individual"></param>
    171171    /// <returns>a double array that holds the distances that describe how much every contraint is violated (0 is not violated). If the current TestFunction does not have constraints an array of length 0 is returned</returns>
    172     public double[] checkContraints(RealVector individual) {
    173       if (TestFunction is IConstrainedTestFunction) {
    174         return ((IConstrainedTestFunction)TestFunction).CheckConstraints(individual, Objectives);
     172    public double[] CheckContraints(RealVector individual) {
     173      var constrainedTestFunction = (IConstrainedTestFunction)TestFunction;
     174      if (constrainedTestFunction != null) {
     175        return constrainedTestFunction.CheckConstraints(individual, Objectives);
    175176      }
    176177      return new double[0];
Note: See TracChangeset for help on using the changeset viewer.