本文整理了Java中org.apache.commons.math3.random.RandomDataGenerator.nextExponential
方法的一些代码示例,展示了RandomDataGenerator.nextExponential
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RandomDataGenerator.nextExponential
方法的具体详情如下:
包路径:org.apache.commons.math3.random.RandomDataGenerator
类名称:RandomDataGenerator
方法名:nextExponential
[英]Algorithm Description: Uses the Algorithm SA (Ahrens) from p. 876 in: [1]: Ahrens, J. H. and Dieter, U. (1972). Computer methods for sampling from the exponential and normal distributions. Communications of the ACM, 15, 873-882.
[中]算法描述:使用[1]中第876页的算法SA(Ahrens):Ahrens,J.H.和Dieter,U.(1972年)。指数分布和正态分布抽样的计算机方法。ACM通讯,15873-882。
代码示例来源:origin: org.apache.commons/commons-math3
/**
* Gets an exponentially distributed random value with mean = mu.
*
* @return random exponential value
* @throws MathIllegalArgumentException if the underlying random generator thwrows one
*/
private double getNextExponential() throws MathIllegalArgumentException {
return randomData.nextExponential(mu);
}
代码示例来源:origin: org.apache.commons/commons-math3
/**
* {@inheritDoc}
*
* <p>
* <strong>Algorithm Description</strong>: Uses the Algorithm SA (Ahrens)
* from p. 876 in:
* [1]: Ahrens, J. H. and Dieter, U. (1972). Computer methods for
* sampling from the exponential and normal distributions.
* Communications of the ACM, 15, 873-882.
* </p>
*/
public double nextExponential(double mean) throws NotStrictlyPositiveException {
return delegate.nextExponential(mean);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* Gets an exponentially distributed random value with mean = mu.
*
* @return random exponential value
* @throws MathIllegalArgumentException if the underlying random generator thwrows one
*/
private double getNextExponential() throws MathIllegalArgumentException {
return randomData.nextExponential(mu);
}
代码示例来源:origin: geogebra/geogebra
/**
* {@inheritDoc}
*
* <p>
* <strong>Algorithm Description</strong>: Uses the Algorithm SA (Ahrens)
* from p. 876 in:
* [1]: Ahrens, J. H. and Dieter, U. (1972). Computer methods for
* sampling from the exponential and normal distributions.
* Communications of the ACM, 15, 873-882.
* </p>
*/
public double nextExponential(double mean) throws NotStrictlyPositiveException {
return delegate.nextExponential(mean);
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
/**
* {@inheritDoc}
*
* <p>
* <strong>Algorithm Description</strong>: Uses the Algorithm SA (Ahrens)
* from p. 876 in:
* [1]: Ahrens, J. H. and Dieter, U. (1972). Computer methods for
* sampling from the exponential and normal distributions.
* Communications of the ACM, 15, 873-882.
* </p>
*/
public double nextExponential(double mean) throws NotStrictlyPositiveException {
return delegate.nextExponential(mean);
}
代码示例来源:origin: stackoverflow.com
RandomDataGenerator generator = new RandomDataGenerator(new Well19937c());
// Unit normal
double normDev = generator.nextGaussian(0, 1);
// mean = 0.5, std dev = 2
double normDev2 = generator.nextGaussian(0.5, 2);
// exponential, mean = 1
double expDev = generator.nextExponential(1);
内容来源于网络,如有侵权,请联系作者删除!