/** * {@inheritDoc} * * @throws TooManyEvaluationsException */ public void trigger(int max) { throw new TooManyEvaluationsException(max); } }
/** * {@inheritDoc} * @throws TooManyEvaluationsException */ public void trigger(int max) { throw new TooManyEvaluationsException(max); } }
/** * Increment the evaluation count by one. * Method {@link #computeObjectiveValue(double)} calls this method internally. * It is provided for subclasses that do not exclusively use * {@code computeObjectiveValue} to solve the function. * See e.g. {@link AbstractUnivariateDifferentiableSolver}. * * @throws TooManyEvaluationsException when the allowed number of function * evaluations has been exhausted. */ protected void incrementEvaluationCount() throws TooManyEvaluationsException { try { evaluations.increment(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } } }
/** * @param f Function. * @param x Argument. * @return {@code f(x)} * @throws TooManyEvaluationsException if the maximal number of evaluations is * exceeded. */ private double eval(UnivariateFunction f, double x) { try { evaluations.increment(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return f.value(x); } }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value at the specified point. * @throws TooManyEvaluationsException if the maximal number of * evaluations is exceeded. */ protected double computeObjectiveValue(double[] point) { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return function.value(point); }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value at the specified point. * @throws TooManyEvaluationsException if the maximal number of evaluations is * exceeded. */ protected double[] computeObjectiveValue(double[] point) { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return function.value(point); }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value at specified point. * @throws TooManyEvaluationsException if the maximal number of evaluations * is exceeded. */ protected double computeObjectiveValue(double point) { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return function.value(point); }
/** * @param f Function. * @param x Argument. * @return {@code f(x)} * @throws TooManyEvaluationsException if the maximal number of evaluations is * exceeded. */ private double eval(UnivariateFunction f, double x) { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return f.value(x); } }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value at specified point. * @throws TooManyEvaluationsException if the maximal number of function * evaluations is exceeded. */ protected double computeObjectiveValue(final double point) throws TooManyEvaluationsException { try { evaluations.increment(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return function.value(point); }
while (s == null) { if (attempts++ >= getMaxEvaluations()) { throw new TooManyEvaluationsException(getMaxEvaluations());
/** * {@inheritDoc} * @throws TooManyEvaluationsException */ public void trigger(int max) { throw new TooManyEvaluationsException(max); } }
/** * {@inheritDoc} * * @throws TooManyEvaluationsException */ public void trigger(int max) { throw new TooManyEvaluationsException(max); } }
/** * {@inheritDoc} * @throws TooManyEvaluationsException */ public void trigger(int max) { throw new TooManyEvaluationsException(max); } }
/** * {@inheritDoc} * * @throws TooManyEvaluationsException */ public void trigger(int max) { throw new TooManyEvaluationsException(max); } }
/** * @param f Function. * @param x Argument. * @return {@code f(x)} * @throws TooManyEvaluationsException if the maximal number of evaluations is * exceeded. */ private double eval(UnivariateFunction f, double x) { try { evaluations.increment(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return f.value(x); } }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value at the specified point. * @throws TooManyEvaluationsException if the maximal number of evaluations is * exceeded. */ protected double[] computeObjectiveValue(double[] point) { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return function.value(point); }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value at specified point. * @throws TooManyEvaluationsException if the maximal number of evaluations * is exceeded. */ protected double computeObjectiveValue(double point) { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return function.value(point); }
/** * Compute the objective function value. * * @param point Point at which the objective function must be evaluated. * @return the objective function value at the specified point. * @throws TooManyEvaluationsException if the maximal number of * evaluations is exceeded. */ protected double computeObjectiveValue(double[] point) { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return function.value(point); }
/** * @param f Function. * @param x Argument. * @return {@code f(x)} * @throws TooManyEvaluationsException if the maximal number of evaluations is * exceeded. */ private double eval(UnivariateFunction f, double x) { try { evaluations.incrementCount(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return f.value(x); } }
/** * @param f Function. * @param x Argument. * @return {@code f(x)} * @throws TooManyEvaluationsException if the maximal number of evaluations is * exceeded. */ private double eval(UnivariateFunction f, double x) { try { evaluations.increment(); } catch (MaxCountExceededException e) { throw new TooManyEvaluationsException(e.getMax()); } return f.value(x); } }