EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.spa.basicsolver.visitor.perfhandler]

COVERAGE SUMMARY FOR SOURCE FILE [PerformanceSequenceHandler.java]

nameclass, %method, %block, %line, %
PerformanceSequenceHandler.java0%   (0/1)0%   (0/5)0%   (0/59)0%   (0/24)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PerformanceSequenceHandler0%   (0/1)0%   (0/5)0%   (0/59)0%   (0/24)
PerformanceSequenceHandler (): void 0%   (0/1)0%   (0/3)0%   (0/2)
PerformanceSequenceHandler (Hashtable): void 0%   (0/1)0%   (0/6)0%   (0/3)
getPdfTable (): Hashtable 0%   (0/1)0%   (0/3)0%   (0/1)
handle (Sequence): void 0%   (0/1)0%   (0/43)0%   (0/16)
setPdfTable (Hashtable): void 0%   (0/1)0%   (0/4)0%   (0/2)

1/**
2 * 
3 */
4package de.uka.ipd.sdq.spa.basicsolver.visitor.perfhandler;
5 
6import java.util.Hashtable;
7 
8import de.uka.ipd.sdq.probfunction.math.IProbabilityDensityFunction;
9import de.uka.ipd.sdq.probfunction.math.exception.FunctionsInDifferenDomainsException;
10import de.uka.ipd.sdq.probfunction.math.exception.IncompatibleUnitsException;
11import de.uka.ipd.sdq.probfunction.math.exception.UnknownPDFTypeException;
12import de.uka.ipd.sdq.spa.basicsolver.visitor.SequenceHandler;
13import de.uka.ipd.sdq.spa.expression.Expression;
14import de.uka.ipd.sdq.spa.expression.Sequence;
15 
16/**
17 * @author Ihssane
18 * 
19 */
20public class PerformanceSequenceHandler implements SequenceHandler {
21 
22        private Hashtable<Expression, IProbabilityDensityFunction> pdfTable;
23 
24        protected PerformanceSequenceHandler(
25                        Hashtable<Expression, IProbabilityDensityFunction> pdfTable) {
26                super();
27                this.pdfTable = pdfTable;
28        }
29 
30        public void handle(Sequence seq) {
31                try {
32                        IProbabilityDensityFunction leftDF = pdfTable.get(seq
33                                        .getLeftRegExp());
34                        IProbabilityDensityFunction rightDF = pdfTable.get(seq
35                                        .getRightRegExp());
36                        IProbabilityDensityFunction seqPDF = leftDF.mult(rightDF);
37                        pdfTable.put(seq, seqPDF);
38                } catch (FunctionsInDifferenDomainsException e) {
39                        e.printStackTrace();
40                        System.exit(1);
41                } catch (UnknownPDFTypeException e) {
42                        e.printStackTrace();
43                        System.exit(1);
44                } catch (IncompatibleUnitsException e) {
45                        e.printStackTrace();
46                        System.exit(1);
47                }
48        }
49 
50        public Hashtable<Expression, IProbabilityDensityFunction> getPdfTable() {
51                return pdfTable;
52        }
53 
54        public void setPdfTable(
55                        Hashtable<Expression, IProbabilityDensityFunction> pdfTable) {
56                this.pdfTable = pdfTable;
57        }
58 
59        protected PerformanceSequenceHandler() {
60                super();
61        }
62 
63}

[all classes][de.uka.ipd.sdq.spa.basicsolver.visitor.perfhandler]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov