| 1 | package de.uka.ipd.sdq.probfunction.math.apache.impl; |
| 2 | |
| 3 | |
| 4 | import de.uka.ipd.sdq.probfunction.math.IGammaDistribution; |
| 5 | import de.uka.ipd.sdq.probfunction.math.apache.distribution.GammaDistributionFromMomentsImpl; |
| 6 | |
| 7 | public class GammaDistributionFromMoments extends GammaDistribution implements IGammaDistribution { |
| 8 | |
| 9 | /** |
| 10 | * Constructs a GammaDist object based on the distribution mean and |
| 11 | * distribution coefficient of variance. |
| 12 | * @param distribution mean |
| 13 | * @param coefficient of variance ( = standard deviation / mean) |
| 14 | */ |
| 15 | public GammaDistributionFromMoments(double mean, double coefficientOfVariance) { |
| 16 | |
| 17 | double variance = coefficientOfVariance * coefficientOfVariance * mean * mean ; |
| 18 | this.internalFunction = new GammaDistributionFromMomentsImpl(mean, variance); |
| 19 | } |
| 20 | |
| 21 | |
| 22 | } |