1 | package de.uka.ipd.sdq.probfunction.math.apache.impl; |
2 | |
3 | |
4 | import org.apache.commons.math.MathException; |
5 | |
6 | |
7 | import de.uka.ipd.sdq.probfunction.math.apache.distribution.LognormalDistributionFromMomentsImpl; |
8 | import de.uka.ipd.sdq.probfunction.math.exception.ProbabilityFunctionException; |
9 | |
10 | public class LognormalDistributionFromMoments extends LognormalDistribution { |
11 | |
12 | /** |
13 | * Constructs a GammaDist object based on the distribution mean and |
14 | * distribution coefficient of variance. |
15 | * @param distribution mean |
16 | * @param coefficient of variance ( = standard deviation / mean) |
17 | * @throws MathException |
18 | */ |
19 | public LognormalDistributionFromMoments(double mean, double variance) { |
20 | |
21 | |
22 | try { |
23 | this.internalFunction = new LognormalDistributionFromMomentsImpl(mean, variance); |
24 | } catch (MathException e) { |
25 | throw new ProbabilityFunctionException(e.getLocalizedMessage()); |
26 | |
27 | } |
28 | } |
29 | |
30 | |
31 | } |