本文整理汇总了Java中org.apache.commons.math3.exception.util.LocalizedFormats.NO_OPTIMUM_COMPUTED_YET属性的典型用法代码示例。如果您正苦于以下问题:Java LocalizedFormats.NO_OPTIMUM_COMPUTED_YET属性的具体用法?Java LocalizedFormats.NO_OPTIMUM_COMPUTED_YET怎么用?Java LocalizedFormats.NO_OPTIMUM_COMPUTED_YET使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.math3.exception.util.LocalizedFormats
的用法示例。
在下文中一共展示了LocalizedFormats.NO_OPTIMUM_COMPUTED_YET属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOptima
/**
* Get all the optima found during the last call to {@link
* #optimize(int,UnivariateFunction,GoalType,double,double) optimize}.
* The optimizer stores all the optima found during a set of
* restarts. The {@link #optimize(int,UnivariateFunction,GoalType,double,double) optimize}
* method returns the best point only. This method returns all the points
* found at the end of each starts, including the best one already
* returned by the {@link #optimize(int,UnivariateFunction,GoalType,double,double) optimize}
* method.
* <br/>
* The returned array as one element for each start as specified
* in the constructor. It is ordered with the results from the
* runs that did converge first, sorted from best to worst
* objective value (i.e in ascending order if minimizing and in
* descending order if maximizing), followed by {@code null} elements
* corresponding to the runs that did not converge. This means all
* elements will be {@code null} if the {@link
* #optimize(int,UnivariateFunction,GoalType,double,double) optimize}
* method did throw an exception.
* This also means that if the first element is not {@code null}, it is
* the best point found across all starts.
*
* @return an array containing the optima.
* @throws MathIllegalStateException if {@link
* #optimize(int,UnivariateFunction,GoalType,double,double) optimize}
* has not been called.
*/
public UnivariatePointValuePair[] getOptima() {
if (optima == null) {
throw new MathIllegalStateException(LocalizedFormats.NO_OPTIMUM_COMPUTED_YET);
}
return optima.clone();
}
示例2: getOptima
/**
* Get all the optima found during the last call to {@link
* #optimize(int,MultivariateVectorFunction,double[],double[],double[]) optimize}.
* The optimizer stores all the optima found during a set of
* restarts. The {@link #optimize(int,MultivariateVectorFunction,double[],double[],double[])
* optimize} method returns the best point only. This method
* returns all the points found at the end of each starts, including
* the best one already returned by the {@link
* #optimize(int,MultivariateVectorFunction,double[],double[],double[]) optimize} method.
* <br/>
* The returned array as one element for each start as specified
* in the constructor. It is ordered with the results from the
* runs that did converge first, sorted from best to worst
* objective value (i.e. in ascending order if minimizing and in
* descending order if maximizing), followed by and null elements
* corresponding to the runs that did not converge. This means all
* elements will be null if the {@link
* #optimize(int,MultivariateVectorFunction,double[],double[],double[]) optimize} method did
* throw a {@link ConvergenceException}). This also means that if
* the first element is not {@code null}, it is the best point found
* across all starts.
*
* @return array containing the optima
* @throws MathIllegalStateException if {@link
* #optimize(int,MultivariateVectorFunction,double[],double[],double[]) optimize} has not been
* called.
*/
public PointVectorValuePair[] getOptima() {
if (optima == null) {
throw new MathIllegalStateException(LocalizedFormats.NO_OPTIMUM_COMPUTED_YET);
}
return optima.clone();
}
示例3: getOptima
/**
* Get all the optima found during the last call to {@link
* #optimize(int,MultivariateFunction,GoalType,double[]) optimize}.
* The optimizer stores all the optima found during a set of
* restarts. The {@link #optimize(int,MultivariateFunction,GoalType,double[])
* optimize} method returns the best point only. This method
* returns all the points found at the end of each starts,
* including the best one already returned by the {@link
* #optimize(int,MultivariateFunction,GoalType,double[]) optimize} method.
* <br/>
* The returned array as one element for each start as specified
* in the constructor. It is ordered with the results from the
* runs that did converge first, sorted from best to worst
* objective value (i.e in ascending order if minimizing and in
* descending order if maximizing), followed by and null elements
* corresponding to the runs that did not converge. This means all
* elements will be null if the {@link #optimize(int,MultivariateFunction,GoalType,double[])
* optimize} method did throw an exception.
* This also means that if the first element is not {@code null}, it
* is the best point found across all starts.
*
* @return an array containing the optima.
* @throws MathIllegalStateException if {@link
* #optimize(int,MultivariateFunction,GoalType,double[]) optimize}
* has not been called.
*/
public PointValuePair[] getOptima() {
if (optima == null) {
throw new MathIllegalStateException(LocalizedFormats.NO_OPTIMUM_COMPUTED_YET);
}
return optima.clone();
}
示例4: getOptima
/**
* Gets all the optima found during the last call to {@code optimize}.
* The optimizer stores all the optima found during a set of
* restarts. The {@code optimize} method returns the best point only.
* This method returns all the points found at the end of each starts,
* including the best one already returned by the {@code optimize} method.
* <br/>
* The returned array as one element for each start as specified
* in the constructor. It is ordered with the results from the
* runs that did converge first, sorted from best to worst
* objective value (i.e in ascending order if minimizing and in
* descending order if maximizing), followed by {@code null} elements
* corresponding to the runs that did not converge. This means all
* elements will be {@code null} if the {@code optimize} method did throw
* an exception.
* This also means that if the first element is not {@code null}, it is
* the best point found across all starts.
*
* @return an array containing the optima.
* @throws MathIllegalStateException if {@link #optimize(OptimizationData[])
* optimize} has not been called.
*/
public UnivariatePointValuePair[] getOptima() {
if (optima == null) {
throw new MathIllegalStateException(LocalizedFormats.NO_OPTIMUM_COMPUTED_YET);
}
return optima.clone();
}