Evaluate() method
359573
public void evaluate(DoubleSolution solution) {
    double[] f = new double[getNumberOfObjectives()];

    double g = this.evalG(solution);
    f[0] = (1 + g) * Math.cos(0.5 * Math.PI * solution.getVariableValue(0))
    		* Math.cos(0.5 * Math.PI * solution.getVariableValue(1));
    f[1] = (1 + g) * Math.cos(0.5 * Math.PI * solution.getVariableValue(0))
    		* Math.sin(0.5 * Math.PI * solution.getVariableValue(1));
    f[2] = (1 + g) * Math.sin(0.5 * Math.PI * solution.getVariableValue(0));

    solution.setObjective(0, f[0]);
    solution.setObjective(1, f[1]);
    solution.setObjective(2, f[2]);
  }
281822
public void evaluate(DoubleSolution solution) {
    int numberOfVariables = getNumberOfVariables();
    int numberOfObjectives = getNumberOfObjectives();
    double[] f = new double[numberOfObjectives];
    double[] x = new double[numberOfVariables] ;

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i) ;
    }

    int k = getNumberOfVariables() - getNumberOfObjectives() + 1;

    double g = 0.0;
    for (int i = numberOfVariables - k; i < numberOfVariables; i++) {
      g += (x[i] - 0.5) * (x[i] - 0.5);
    }

    for (int i = 0; i < numberOfObjectives; i++) {
      f[i] = 1.0 + g;
    }

    for (int i = 0; i < numberOfObjectives; i++) {
      for (int j = 0; j < numberOfObjectives - (i + 1); j++) {
        f[i] *= Math.cos(x[j] * 0.5 * Math.PI);
      }
      if (i != 0) {
        int aux = numberOfObjectives - (i + 1);
        f[i] *= Math.sin(x[aux] * 0.5 * Math.PI);
      }
    }

    for (int i = 0; i < numberOfObjectives; i++) {
      solution.setObjective(i, f[i]);
    }
  }
1069101
public Object evaluate()
  {
    if( !isCompileTimeConstant() )
    {
      return super.evaluate();
    }

    return (Boolean)getLHS().evaluate() || (Boolean)getRHS().evaluate();
  }
494844
public static boolean eval(String s) {
        if (S.isEmpty(s)) return false;
        if ("false".equalsIgnoreCase(s)) return false;
        if ("no".equalsIgnoreCase(s)) return false;
        return true;
    }
816103
private Object eval(ExpressionContext expr) {
    Object res = expr;
    while(res instanceof ExpressionContext)
      res = ((ExpressionContext)res).accept(visitor);
    if(res instanceof LValue)
      res = ((LValue) res).get(expr);
    return res;
  }
245125
@Override
  public void evaluate(DoubleSolution solution) {

    int numberOfVariables = solution.getNumberOfVariables();
    int numberOfObjectives = solution.getNumberOfObjectives();

    double[] x = new double[numberOfVariables];
    double[] f = new double[numberOfObjectives];

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i);
    }

    double[] g = new double[numberOfObjectives];
    double[] thet = new double[numberOfObjectives - 1];
    int lb, ub;
    // evaluate g, thet
    for (int i = 0; i < numberOfObjectives - 1; i++) {
      g[i] = 0;
      lb = numberOfObjectives + i * const2;
      ub = numberOfObjectives + (i + 1) * const2 - 1;
      for (int j = lb - 1; j < ub; j++) {
        g[i] += Math.pow(x[j] / 2 - 0.25, 2);
      }
      thet[i] = Math.PI / 2 * (x[i] / 2 + 0.25);
    }
    lb = numberOfObjectives + (numberOfObjectives - 1) * const2;
    ub = numberOfVariables;
    for (int j = lb - 1; j < ub; j++) {
      g[numberOfObjectives - 1] += Math.pow(x[j] / 2 - 0.25, 2);
    }
    // evaluate fm,fm-1,...,2,f1
    f[numberOfObjectives - 1] = Math.sin(thet[0]) * (1 + g[numberOfObjectives - 1]);
    double subf1 = 1;
    // fi=cos(thet1)cos(thet2)...cos(thet[m-i])*sin(thet(m-i+1))*(1+g[i]),fi=subf1*subf2*subf3
    for (int i = numberOfObjectives - 2; i > 0; i--) {
      subf1 *= Math.cos(thet[numberOfObjectives - i - 2]);
      f[i] = subf1 * Math.sin(thet[numberOfObjectives - i - 1]) * (1 + g[i]);
    }
    f[0] = subf1 * Math.cos(thet[numberOfObjectives - 2]) * (1 + g[0]);

    for (int i = 0; i < numberOfObjectives; i++) {
      solution.setObjective(i, f[i]);
    }
  }
84433
function(ctx) {
    assert(this.args.length == 3);
    if (this.args[0].evaluate(ctx).booleanValue()) {
      return this.args[1].evaluate(ctx);
    } else {
      return this.args[2].evaluate(ctx);
    }
  }
294451
function evaluate(expr) {
            if (expr.substring(0, 2) === '==') {
                return 'write(JSON.stringify('+expr.substring(2).trim()+'));\n';
            } else if (expr.substring(0, 1) === '=') {
                return 'write('+expr.substring(1).trim()+');\n';
            } else if (expr.substring(0, 3) === '...') {
                expr = '//...\n'+expr.substring(3).trim()+'\n//.';
            }
            if (expr !== '') {
                return expr+'\n';
            }
            return '';
        }
1326106
@Override
	public Object evaluate(Message message) throws JMSException
    {
        String leftValue = leftOperand.evaluateString(message);
        String rightValue = rightOperand.evaluateString(message);
        if (leftValue == null || rightValue == null)
            return null;
        
        String escapeValue = escapeOperand != null ? escapeOperand.evaluateString(message) : null;
        
        return StringUtils.matches(leftValue, rightValue, escapeValue);
    }
1021185
def do_evaluate(parser, token):
  ''''''
  code = token.contents
  firstspace = code.find(' ')
  if firstspace >= 0:
    code = code[firstspace+1:]
  return Evaluator(code)
1247381
public void evaluate(DoubleSolution solution) {
    List<Double> x = new ArrayList<Double>(getNumberOfVariables());
    List<Double> y = new ArrayList<Double>(getNumberOfObjectives());

    for (int i = 0; i < getNumberOfVariables(); i++) {
      x.add(solution.getVariableValue(i));
      y.add(0.0);
    }

    lz09.objective(x, y);

    for (int i = 0; i < getNumberOfObjectives(); i++) {
      solution.setObjective(i, y.get(i));
    }
  }
1108978
@Override
  public void evaluate(DoubleSolution solution) {

    int numberOfVariables = solution.getNumberOfVariables();
    int numberOfObjectives = solution.getNumberOfObjectives();

    double[] x = new double[numberOfVariables];
    double[] f = new double[numberOfObjectives];

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i);
    }

    // change x
    for (int i = numberOfObjectives - 1; i < numberOfVariables; i++) {
      x[i] = (1 + Math.cos((i + 1) / (double) numberOfVariables * Math.PI / 2)) * x[i] - 10 * x[0];
    }
    // evaluate eta,g
    double[] g = new double[numberOfObjectives];
    double sub1;
    for (int i = 0; i < numberOfObjectives; i = i + 2) {
      double[] tx = new double[sublen15[i]];
      sub1 = 0;
      for (int j = 0; j < nk15; j++) {
        System
            .arraycopy(x, len15[i] + numberOfObjectives - 1 + j * sublen15[i], tx, 0, sublen15[i]);
        sub1 += Griewank(tx);
      }
      g[i] = sub1 / (nk15 * sublen15[i]);
    }

    for (int i = 1; i < numberOfObjectives; i = i + 2) {
      double[] tx = new double[sublen15[i]];
      sub1 = 0;
      for (int j = 0; j < nk15; j++) {
        System
            .arraycopy(x, len15[i] + numberOfObjectives - 1 + j * sublen15[i], tx, 0, sublen15[i]);
        sub1 += Sphere(tx);
      }
      g[i] = sub1 / (nk15 * sublen15[i]);
    }

    // evaluate fm,fm-1,...,2,f1
    double subf1 = 1;
    f[numberOfObjectives - 1] =
        (1 - Math.sin(Math.PI * x[0] / 2)) * (1 + g[numberOfObjectives - 1]);
    for (int i = numberOfObjectives - 2; i > 0; i--) {
      subf1 *= Math.cos(Math.PI * x[numberOfObjectives - i - 2] / 2);
      f[i] = (1 - subf1 * Math.sin(Math.PI * x[numberOfObjectives - i - 1] / 2)) * (1 + g[i] + g[i
          + 1]);
    }
    f[0] = (1 - subf1 * Math.cos(Math.PI * x[numberOfObjectives - 2] / 2)) * (1 + g[0] + g[1]);

    for (int i = 0; i < numberOfObjectives; i++) {
      solution.setObjective(i, f[i]);
    }

  }
153176
function evaluate(val, context) {
        if ($.isFunction(val)) {
            var args = Array.prototype.slice.call(arguments, 2);
            return val.apply(context, args);
        }
        return val;
    }
1291652
def evaluate(context, *args)
      {}.tap do |evaluated|
        each do |k,v|
          evaluated[k] = v.(context, *args)
        end
      end
    end
281699
@Override
  public void evaluate(DoubleSolution solution) {
    int numberOfVariables = getNumberOfVariables() ;

    double[] f = new double[getNumberOfObjectives()];
    double[] x = new double[numberOfVariables] ;

    for (int i = 0; i < numberOfVariables; i++) {
      x[i] = solution.getVariableValue(i) ;
    }

    double sum1 = 0.0;
    for (int i = 0; i < numberOfVariables; i++) {
      sum1 += StrictMath.pow(x[i] - (1.0 / StrictMath.sqrt((double) numberOfVariables)), 2.0);
    }
    double exp1 = StrictMath.exp((-1.0) * sum1);
    f[0] = 1 - exp1;

    double sum2 = 0.0;
    for (int i = 0; i < numberOfVariables; i++) {
      sum2 += StrictMath.pow(x[i] + (1.0 / StrictMath.sqrt((double) numberOfVariables)), 2.0);
    }
    double exp2 = StrictMath.exp((-1.0) * sum2);
    f[1] = 1 - exp2;

    solution.setObjective(0, f[0]);
    solution.setObjective(1, f[1]);
  }
1155330
public void evaluate(DoubleSolution solution) {
    float[] variables = new float[getNumberOfVariables()];
    double[] x = new double[getNumberOfVariables()];

    for (int i = 0; i < getNumberOfVariables(); i++) {
      x[i] = solution.getVariableValue(i);
    }

    for (int i = 0; i < getNumberOfVariables(); i++) {
      variables[i] = (float) x[i] ;
    }

    float[] sol2 = evaluate(variables);

    for (int i = 0; i < sol2.length; i++) {
      solution.setObjective(i, sol2[i]);
    }
  }
1162826
def evaluate(self, **kwargs):
        
        self._eval_points = kwargs.get('points', self._init_array())
        self._dimension = len(self._eval_points[0])