/// <summary> /// Increment the evaluation count by one. /// Method <see cref="computeObjectiveValue(double)"/> calls this method internally. /// It is provided for subclasses that do not exclusively use /// <c>computeObjectiveValue</c> to solve the function. /// See e.g. <see cref="AbstractUnivariateDifferentiableSolver"/>. /// </summary> /// <exception cref="TooManyEvaluationsException"> when the allowed number of function /// evaluations has been exhausted.</exception> protected void incrementEvaluationCount() { try { evaluations.incrementCount(); } catch (MaxCountExceededException <Int32> e) { throw new TooManyEvaluationsException <Int32>(e.getMax()); } }