1

Javaでガンマ分布から数値を生成するにはどうすればよいですか?

4

2 に答える 2

2

GammaDistributionApache Commons-Math パッケージからのものです:

double sample = new GammaDistribution(shape, scale).sample();
于 2014-09-17T07:46:28.223 に答える
1

Apache Commons Math 3.3 API に可能性があります

GammaDistribution(double shape, double scale)
// Creates a new gamma distribution with specified values of the shape and scale parameters.
GammaDistribution(double shape, double scale, double inverseCumAccuracy)
// Creates a new gamma distribution with specified values of the shape and scale parameters.
GammaDistribution(RandomGenerator rng, double shape, double scale)
// Creates a Gamma distribution.
GammaDistribution(RandomGenerator rng, double shape, double scale, double inverseCumAccuracy)
// Creates a Gamma distribution.

参照: http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math3/distribution/GammaDistribution.html

于 2014-09-17T07:48:52.323 に答える