本文整理汇总了Java中org.apache.commons.math3.exception.util.LocalizedFormats.UNKNOWN_MODE属性的典型用法代码示例。如果您正苦于以下问题:Java LocalizedFormats.UNKNOWN_MODE属性的具体用法?Java LocalizedFormats.UNKNOWN_MODE怎么用?Java LocalizedFormats.UNKNOWN_MODE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.math3.exception.util.LocalizedFormats
的用法示例。
在下文中一共展示了LocalizedFormats.UNKNOWN_MODE属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNext
/**
* Returns the next generated value, generated according
* to the mode value (see MODE constants).
*
* @return generated value
* @throws IOException in REPLAY_MODE if a file I/O error occurs
* @throws MathIllegalStateException if mode is not recognized
* @throws MathIllegalArgumentException if the underlying random generator thwrows one
*/
public double getNext() throws IOException, MathIllegalStateException, MathIllegalArgumentException {
switch (mode) {
case DIGEST_MODE: return getNextDigest();
case REPLAY_MODE: return getNextReplay();
case UNIFORM_MODE: return getNextUniform();
case EXPONENTIAL_MODE: return getNextExponential();
case GAUSSIAN_MODE: return getNextGaussian();
case CONSTANT_MODE: return mu;
default: throw new MathIllegalStateException(
LocalizedFormats.UNKNOWN_MODE,
mode,
"DIGEST_MODE", DIGEST_MODE, "REPLAY_MODE", REPLAY_MODE,
"UNIFORM_MODE", UNIFORM_MODE, "EXPONENTIAL_MODE", EXPONENTIAL_MODE,
"GAUSSIAN_MODE", GAUSSIAN_MODE, "CONSTANT_MODE", CONSTANT_MODE);
}
}