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 [PoissonDistribution.java]

nameclass, %method, %block, %line, %
PoissonDistribution.java0%   (0/1)0%   (0/10)0%   (0/45)0%   (0/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PoissonDistribution0%   (0/1)0%   (0/10)0%   (0/45)0%   (0/13)
PoissonDistribution (double): void 0%   (0/1)0%   (0/9)0%   (0/3)
getArithmeticMeanValue (): double 0%   (0/1)0%   (0/3)0%   (0/1)
getLowerDomainBorder (): double 0%   (0/1)0%   (0/4)0%   (0/1)
getMean (): double 0%   (0/1)0%   (0/5)0%   (0/1)
getMedian (): Object 0%   (0/1)0%   (0/4)0%   (0/1)
getPercentile (int): Object 0%   (0/1)0%   (0/4)0%   (0/1)
getStandardDeviation (): double 0%   (0/1)0%   (0/8)0%   (0/2)
getXinf (): double 0%   (0/1)0%   (0/2)0%   (0/1)
getXsup (): double 0%   (0/1)0%   (0/2)0%   (0/1)
hasOrderedDomain (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.probfunction.math.apache.impl;
5 
6 
7import org.apache.commons.math.distribution.PoissonDistributionImpl;
8 
9 
10import de.uka.ipd.sdq.probfunction.math.IPoissonDistribution;
11import de.uka.ipd.sdq.probfunction.math.exception.DomainNotNumbersException;
12import de.uka.ipd.sdq.probfunction.math.exception.FunctionNotInTimeDomainException;
13 
14import de.uka.ipd.sdq.probfunction.math.exception.UnorderedDomainException;
15 
16/**
17 * @author joerg
18 *
19 */
20public class PoissonDistribution extends AbstractDiscretePDF implements IPoissonDistribution{
21        
22        public PoissonDistribution(double lambda) 
23        {
24                this.internalFunction = new PoissonDistributionImpl(lambda);
25        }
26 
27        /* (non-Javadoc)
28         * @see de.uka.ipd.sdq.probfunction.math.IContinousPDF#getStandardDeviation()
29         */
30        @Override
31        public double getStandardDeviation() 
32        {
33                
34                double lambda = ((PoissonDistributionImpl)internalFunction).getMean();
35                return Math.sqrt(lambda);
36        }
37 
38        /* (non-Javadoc)
39         * @see de.uka.ipd.sdq.probfunction.math.IContinousPDF#getXinf()
40         */
41        @Override
42        public double getXinf() {
43                return 0;
44        }
45 
46        /* (non-Javadoc)
47         * @see de.uka.ipd.sdq.probfunction.math.IContinousPDF#getXsup()
48         */
49        @Override
50        public double getXsup() {
51                
52                return Double.POSITIVE_INFINITY;
53        }
54 
55        
56        /* (non-Javadoc)
57         * @see de.uka.ipd.sdq.probfunction.math.IProbabilityFunction#getArithmeticMeanValue()
58         */
59        @Override
60        public double getArithmeticMeanValue() throws DomainNotNumbersException,
61                        FunctionNotInTimeDomainException {
62                return getMean();
63        }
64 
65        /* (non-Javadoc)
66         * @see de.uka.ipd.sdq.probfunction.math.IProbabilityFunction#getMedian()
67         */
68        @Override
69        public Object getMedian() throws UnorderedDomainException {
70                throw new UnsupportedOperationException();
71        }
72 
73        /* (non-Javadoc)
74         * @see de.uka.ipd.sdq.probfunction.math.IProbabilityFunction#getPercentile(int)
75         */
76        @Override
77        public Object getPercentile(int p) throws IndexOutOfBoundsException,
78                        UnorderedDomainException {
79                throw new UnsupportedOperationException();
80        }
81 
82        /* (non-Javadoc)
83         * @see de.uka.ipd.sdq.probfunction.math.IProbabilityFunction#hasOrderedDomain()
84         */
85        @Override
86        public boolean hasOrderedDomain() {
87                throw new UnsupportedOperationException();
88        }
89 
90        @Override
91        public double getLowerDomainBorder() {
92                throw new UnsupportedOperationException();
93        }
94 
95        
96 
97        @Override
98        public double getMean() {
99                return ((PoissonDistributionImpl)internalFunction).getMean();
100        }
101 
102}

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