/** Evaluate the cost on one point. * <p>A side effect of this method is to count the number of * function evaluations</p> * @param x point on which the cost function should be evaluated * @return cost at the given point * @exception CostException if no cost can be computed for the parameters */ protected double evaluateCost(double[] x) throws CostException { evaluations++; return f.cost(x); }