本文整理汇总了Java中org.apache.commons.math3.exception.MaxCountExceededException.getMax方法的典型用法代码示例。如果您正苦于以下问题:Java MaxCountExceededException.getMax方法的具体用法?Java MaxCountExceededException.getMax怎么用?Java MaxCountExceededException.getMax使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.commons.math3.exception.MaxCountExceededException
的用法示例。
在下文中一共展示了MaxCountExceededException.getMax方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: eval
import org.apache.commons.math3.exception.MaxCountExceededException; //导入方法依赖的package包/类
/**
* @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);
}
示例2: computeObjectiveValue
import org.apache.commons.math3.exception.MaxCountExceededException; //导入方法依赖的package包/类
/**
* 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);
}
示例3: computeObjectiveValue
import org.apache.commons.math3.exception.MaxCountExceededException; //导入方法依赖的package包/类
/**
* 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);
}
示例4: computeObjectiveValue
import org.apache.commons.math3.exception.MaxCountExceededException; //导入方法依赖的package包/类
/**
* 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);
}
示例5: computeObjectiveValue
import org.apache.commons.math3.exception.MaxCountExceededException; //导入方法依赖的package包/类
/**
* 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);
}
示例6: eval
import org.apache.commons.math3.exception.MaxCountExceededException; //导入方法依赖的package包/类
/**
* @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);
}
示例7: incrementEvaluationCount
import org.apache.commons.math3.exception.MaxCountExceededException; //导入方法依赖的package包/类
/**
* 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());
}
}