EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.stoex.analyser.operations]

COVERAGE SUMMARY FOR SOURCE FILE [AddOperation.java]

nameclass, %method, %block, %line, %
AddOperation.java0%   (0/1)0%   (0/6)0%   (0/38)0%   (0/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AddOperation0%   (0/1)0%   (0/6)0%   (0/38)0%   (0/10)
AddOperation (): void 0%   (0/1)0%   (0/3)0%   (0/1)
calculateOperationForValues (Double, Double): Double 0%   (0/1)0%   (0/7)0%   (0/1)
compute (IProbabilityDensityFunction, double): IProbabilityDensityFunction 0%   (0/1)0%   (0/10)0%   (0/3)
compute (IProbabilityMassFunction, double): IProbabilityMassFunction 0%   (0/1)0%   (0/10)0%   (0/3)
compute (double, double): double 0%   (0/1)0%   (0/4)0%   (0/1)
compute (int, int): int 0%   (0/1)0%   (0/4)0%   (0/1)

1package de.uka.ipd.sdq.stoex.analyser.operations;
2 
3import de.uka.ipd.sdq.probfunction.math.IProbabilityDensityFunction;
4import de.uka.ipd.sdq.probfunction.math.IProbabilityMassFunction;
5import de.uka.ipd.sdq.probfunction.math.exception.DifferentDomainsException;
6import de.uka.ipd.sdq.probfunction.math.exception.DomainNotNumbersException;
7import de.uka.ipd.sdq.probfunction.math.exception.FunctionsInDifferenDomainsException;
8import de.uka.ipd.sdq.probfunction.math.exception.IncompatibleUnitsException;
9import de.uka.ipd.sdq.probfunction.math.exception.UnknownPDFTypeException;
10 
11/**
12 * Implements the operation "addition" for different kinds of operands.
13 * @author martens, koziolek
14 */
15public class AddOperation extends TermProductOperation {
16 
17        @Override
18        public int compute(int left, int right) {
19                return left+right;
20        }
21 
22        @Override
23        public double compute(double left, double right) {
24                return left+right;
25        }
26 
27        @Override
28        public IProbabilityMassFunction compute(IProbabilityMassFunction left, double right) throws DomainNotNumbersException {
29                if (right == 0){
30                        return left;
31                } else {
32                        return left.shiftDomain(right);
33                }
34        }
35 
36        @Override
37        public IProbabilityDensityFunction compute(IProbabilityDensityFunction left, double right) throws DomainNotNumbersException {
38                if (right == 0){
39                        return left;
40                } else {
41                        return left.shiftDomain(right);
42                }
43        }
44 
45        @Override
46        protected Double calculateOperationForValues(Double value1, Double value2) {
47                return value1 + value2;
48        }
49 
50}

[all classes][de.uka.ipd.sdq.stoex.analyser.operations]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov