本文整理汇总了Java中org.apache.commons.math3.exception.util.LocalizedFormats.NOT_POSITIVE_SCALE属性的典型用法代码示例。如果您正苦于以下问题:Java LocalizedFormats.NOT_POSITIVE_SCALE属性的具体用法?Java LocalizedFormats.NOT_POSITIVE_SCALE怎么用?Java LocalizedFormats.NOT_POSITIVE_SCALE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.math3.exception.util.LocalizedFormats
的用法示例。
在下文中一共展示了LocalizedFormats.NOT_POSITIVE_SCALE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: LogisticDistribution
/**
* Build a new instance.
*
* @param rng Random number generator
* @param mu location parameter
* @param s scale parameter (must be positive)
* @throws NotStrictlyPositiveException if {@code beta <= 0}
*/
public LogisticDistribution(RandomGenerator rng, double mu, double s) {
super(rng);
if (s <= 0.0) {
throw new NotStrictlyPositiveException(LocalizedFormats.NOT_POSITIVE_SCALE, s);
}
this.mu = mu;
this.s = s;
}
示例2: LaplaceDistribution
/**
* Build a new instance.
*
* @param rng Random number generator
* @param mu location parameter
* @param beta scale parameter (must be positive)
* @throws NotStrictlyPositiveException if {@code beta <= 0}
*/
public LaplaceDistribution(RandomGenerator rng, double mu, double beta) {
super(rng);
if (beta <= 0.0) {
throw new NotStrictlyPositiveException(LocalizedFormats.NOT_POSITIVE_SCALE, beta);
}
this.mu = mu;
this.beta = beta;
}
示例3: NakagamiDistribution
/**
* Build a new instance.
*
* @param rng Random number generator
* @param mu shape parameter
* @param omega scale parameter (must be positive)
* @param inverseAbsoluteAccuracy the maximum absolute error in inverse
* cumulative probability estimates (defaults to {@link #DEFAULT_INVERSE_ABSOLUTE_ACCURACY}).
* @throws NumberIsTooSmallException if {@code mu < 0.5}
* @throws NotStrictlyPositiveException if {@code omega <= 0}
*/
public NakagamiDistribution(RandomGenerator rng, double mu, double omega, double inverseAbsoluteAccuracy) {
super(rng);
if (mu < 0.5) {
throw new NumberIsTooSmallException(mu, 0.5, true);
}
if (omega <= 0) {
throw new NotStrictlyPositiveException(LocalizedFormats.NOT_POSITIVE_SCALE, omega);
}
this.mu = mu;
this.omega = omega;
this.inverseAbsoluteAccuracy = inverseAbsoluteAccuracy;
}