*/
protected void updateResidualsAndCost()
throws FunctionEvaluationException {
if (++objectiveEvaluations > maxEvaluations) {
throw new FunctionEvaluationException(new MaxEvaluationsExceededException(maxEvaluations),
point);
}
objective = function.value(point);
if (objective.length != rows) {
throw new FunctionEvaluationException(point, LocalizedFormats.DIMENSIONS_MISMATCH_SIMPLE,
objective.length, rows);
}
cost = 0;
int index = 0;
for (int i = 0; i < rows; i++) {