| 1 | /** |
| 2 | * |
| 3 | */ |
| 4 | package de.uka.ipd.sdq.spa.basicsolver.visitor.perfhandler; |
| 5 | |
| 6 | import java.util.Hashtable; |
| 7 | |
| 8 | import de.uka.ipd.sdq.probfunction.math.IProbabilityDensityFunction; |
| 9 | import de.uka.ipd.sdq.spa.basicsolver.visitor.HandlerFactory; |
| 10 | import de.uka.ipd.sdq.spa.expression.Expression; |
| 11 | |
| 12 | /** |
| 13 | * @author Ihssane |
| 14 | * |
| 15 | */ |
| 16 | public class PerformanceHandlerFactory implements HandlerFactory { |
| 17 | |
| 18 | private Hashtable<Expression, IProbabilityDensityFunction> pdfTable; |
| 19 | private int domainSize; |
| 20 | |
| 21 | public PerformanceHandlerFactory(int domainSize) { |
| 22 | super(); |
| 23 | this.domainSize = domainSize; |
| 24 | this.pdfTable = new Hashtable<Expression, IProbabilityDensityFunction>(); |
| 25 | } |
| 26 | |
| 27 | public PerformanceSymbolHandler createSymbolHandler() { |
| 28 | return new PerformanceSymbolHandler(pdfTable, domainSize); |
| 29 | } |
| 30 | |
| 31 | public PerformanceSequenceHandler createSequenceHandler() { |
| 32 | return new PerformanceSequenceHandler(pdfTable); |
| 33 | } |
| 34 | |
| 35 | public PerformanceAlternativeHandler createAlternativeHandler() { |
| 36 | return new PerformanceAlternativeHandler(pdfTable); |
| 37 | } |
| 38 | |
| 39 | public PerformanceLoopHandler createLoopHandler() { |
| 40 | return new PerformanceLoopHandler(pdfTable); |
| 41 | } |
| 42 | |
| 43 | public Hashtable<Expression, IProbabilityDensityFunction> getPdfTable(){ |
| 44 | return pdfTable; |
| 45 | } |
| 46 | } |