EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.probfunction.math.apache.impl]

COVERAGE SUMMARY FOR SOURCE FILE [PDFFactory.java]

nameclass, %method, %block, %line, %
PDFFactory.java100% (1/1)31%  (4/13)28%  (20/71)31%  (4/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PDFFactory100% (1/1)31%  (4/13)28%  (20/71)31%  (4/13)
createBinomialDistribution (int, double): IBinomialDistribution 0%   (0/1)0%   (0/6)0%   (0/1)
createChiSquareDistribution (int): IChiSquareDistribution 0%   (0/1)0%   (0/5)0%   (0/1)
createGammaDistributionFromMoments (double, double): IGammaDistribution 0%   (0/1)0%   (0/6)0%   (0/1)
createLognormalDistributionFromMoments (double, double): ILognormalDistribution 0%   (0/1)0%   (0/6)0%   (0/1)
createNormalDistribution (double, double): INormalDistribution 0%   (0/1)0%   (0/6)0%   (0/1)
createPoissonDistribution (double): IPoissonDistribution 0%   (0/1)0%   (0/5)0%   (0/1)
createStudentTDistribution (int): IStudentTDistribution 0%   (0/1)0%   (0/5)0%   (0/1)
createUniformDistribution (double, double): IUniformDistribution 0%   (0/1)0%   (0/6)0%   (0/1)
createUniformIntDistribution (int, int): IUniformIntDistribution 0%   (0/1)0%   (0/6)0%   (0/1)
PDFFactory (): void 100% (1/1)100% (3/3)100% (1/1)
createExponentialDistribution (double): IExponentialDistribution 100% (1/1)100% (5/5)100% (1/1)
createGammaDistribution (double, double): IGammaDistribution 100% (1/1)100% (6/6)100% (1/1)
createLognormalDistribution (double, double): ILognormalDistribution 100% (1/1)100% (6/6)100% (1/1)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.probfunction.math.apache.impl;
5 
6 
7import de.uka.ipd.sdq.probfunction.math.IBinomialDistribution;
8import de.uka.ipd.sdq.probfunction.math.IChiSquareDistribution;
9import de.uka.ipd.sdq.probfunction.math.IPDFFactory;
10import de.uka.ipd.sdq.probfunction.math.IExponentialDistribution;
11import de.uka.ipd.sdq.probfunction.math.IGammaDistribution;
12import de.uka.ipd.sdq.probfunction.math.ILognormalDistribution;
13import de.uka.ipd.sdq.probfunction.math.INormalDistribution;
14import de.uka.ipd.sdq.probfunction.math.IPoissonDistribution;
15import de.uka.ipd.sdq.probfunction.math.IStudentTDistribution;
16import de.uka.ipd.sdq.probfunction.math.IUniformDistribution;
17import de.uka.ipd.sdq.probfunction.math.IUniformIntDistribution;
18 
19/**
20 * @author joerg
21 *
22 */
23public class PDFFactory implements IPDFFactory{
24 
25        /* (non-Javadoc)
26         * @see de.uka.ipd.sdq.probfunction.math.impl.IContinousPDFFactory#createExponentialDistribution(double)
27         */
28        @Override
29        public IExponentialDistribution createExponentialDistribution(double rate) {
30                return new ExponentialDistribution(rate);
31        }
32 
33        /* (non-Javadoc)
34         * @see de.uka.ipd.sdq.probfunction.math.impl.IContinousPDFFactory#createGammaDistribution(double, double)
35         */
36        @Override
37        public IGammaDistribution createGammaDistribution(double alpha, double theta) {
38                return new GammaDistribution(alpha, theta);
39        }
40 
41        /* (non-Javadoc)
42         * @see de.uka.ipd.sdq.probfunction.math.impl.IContinousPDFFactory#createLognormalDistribution(double, double)
43         */
44        @Override
45        public ILognormalDistribution createLognormalDistribution(double mu, double sigma) {
46                return new LognormalDistribution(mu, sigma);
47        }
48 
49        /* (non-Javadoc)
50         * @see de.uka.ipd.sdq.probfunction.math.impl.IContinousPDFFactory#createNormalDistribution(double, double)
51         */
52        @Override
53        public INormalDistribution createNormalDistribution(double mu, double sigma) {
54                return new NormalDistribution(mu, sigma);
55        }
56 
57        /* (non-Javadoc)
58         * @see de.uka.ipd.sdq.probfunction.math.impl.IContinousPDFFactory#createNormalDistribution(double, double)
59         */
60        @Override
61        public IGammaDistribution createGammaDistributionFromMoments(double mean,
62                        double coeffVar) {
63                
64                return new GammaDistributionFromMoments(mean, coeffVar);
65        }
66 
67        /* (non-Javadoc)
68         * @see de.uka.ipd.sdq.probfunction.math.impl.IContinousPDFFactory#createNormalDistribution(double, double)
69         */
70        @Override
71        public ILognormalDistribution createLognormalDistributionFromMoments(
72                        double mean, double variance)  {
73 
74                return new LognormalDistributionFromMoments(mean, variance);
75        }
76 
77        @Override
78        public IBinomialDistribution createBinomialDistribution(int trials,
79                        double probability) {
80                
81                return new BinomialDistribution(trials, probability);
82        }
83 
84        @Override
85        public IPoissonDistribution createPoissonDistribution(double mean) {
86                
87                return new PoissonDistribution(mean);
88        }
89 
90        @Override
91        public IUniformIntDistribution createUniformIntDistribution(int a, int b) {
92 
93                return new UniformIntDistribution(a, b);
94        }
95 
96        @Override
97        public IUniformDistribution createUniformDistribution(double a, double b) {
98                
99                return new UniformDistribution(a, b);
100        }
101 
102    @Override
103    public IChiSquareDistribution createChiSquareDistribution(int degreesOfFreedom) {
104        return new ChiSquareDistribution(degreesOfFreedom);
105    }
106 
107    @Override
108    public IStudentTDistribution createStudentTDistribution(int degreesOfFreedom) {
109        return new StudentTDistribution(degreesOfFreedom);
110    }
111 
112}

[all classes][de.uka.ipd.sdq.probfunction.math.apache.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov