Class PDFFactory
- java.lang.Object
-
- de.uka.ipd.sdq.probfunction.math.apache.impl.PDFFactory
-
- All Implemented Interfaces:
IContinousPDFFactory
,IDiscretePDFFactory
,IPDFFactory
public class PDFFactory extends Object implements IPDFFactory
-
-
Constructor Summary
Constructors Constructor Description PDFFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IBinomialDistribution
createBinomialDistribution(int trials, double probability)
Creates a new BinomialDistribution for doing math.IChiSquareDistribution
createChiSquareDistribution(int degreesOfFreedom)
Creates a new chi-square distribution with the specified parameter.IExponentialDistribution
createExponentialDistribution(double rate)
Creates a new ExponentialDistribution for doing math.IGammaDistribution
createGammaDistribution(double alpha, double theta)
Creates a new GammaDistribution for doing math.IGammaDistribution
createGammaDistributionFromMoments(double mean, double coeffVar)
Creates a new GammaDistribution for doing math.ILognormalDistribution
createLognormalDistribution(double mu, double sigma)
Creates a new LognormalDistribution for doing math.ILognormalDistribution
createLognormalDistributionFromMoments(double mean, double variance)
Creates a new LognormalDistribution for doing math.INormalDistribution
createNormalDistribution(double mu, double sigma)
Creates a new NormalDistribution for doing math.IPoissonDistribution
createPoissonDistribution(double mean)
Creates a new PoissonDistribution for doing math.IStudentTDistribution
createStudentTDistribution(int degreesOfFreedom)
Creates a new student's t-distribution with the specified parameter.IUniformDistribution
createUniformDistribution(double a, double b)
Creates a new UniformDistribution for doing math.IUniformIntDistribution
createUniformIntDistribution(int a, int b)
Creates a new UniformIntDistribution for doing math.void
setRandomGenerator(IRandomGenerator randomGenerator)
-
-
-
Method Detail
-
setRandomGenerator
public void setRandomGenerator(IRandomGenerator randomGenerator)
- Specified by:
setRandomGenerator
in interfaceIPDFFactory
-
createExponentialDistribution
public IExponentialDistribution createExponentialDistribution(double rate)
Description copied from interface:IContinousPDFFactory
Creates a new ExponentialDistribution for doing math.- Specified by:
createExponentialDistribution
in interfaceIContinousPDFFactory
- Parameters:
rate
- The rate parameter- Returns:
- The distribution
-
createGammaDistribution
public IGammaDistribution createGammaDistribution(double alpha, double theta)
Description copied from interface:IContinousPDFFactory
Creates a new GammaDistribution for doing math.- Specified by:
createGammaDistribution
in interfaceIContinousPDFFactory
- Parameters:
alpha
- The alpha valuetheta
- The theta value- Returns:
- The distribution
-
createLognormalDistribution
public ILognormalDistribution createLognormalDistribution(double mu, double sigma)
Description copied from interface:IContinousPDFFactory
Creates a new LognormalDistribution for doing math.- Specified by:
createLognormalDistribution
in interfaceIContinousPDFFactory
- Parameters:
mu
- The mean valuesigma
- The standard deviation- Returns:
- The distribution
-
createNormalDistribution
public INormalDistribution createNormalDistribution(double mu, double sigma)
Description copied from interface:IContinousPDFFactory
Creates a new NormalDistribution for doing math.- Specified by:
createNormalDistribution
in interfaceIContinousPDFFactory
- Parameters:
mu
- The mean valuesigma
- The standard deviation- Returns:
- The distribution
-
createGammaDistributionFromMoments
public IGammaDistribution createGammaDistributionFromMoments(double mean, double coeffVar)
Description copied from interface:IContinousPDFFactory
Creates a new GammaDistribution for doing math.- Specified by:
createGammaDistributionFromMoments
in interfaceIContinousPDFFactory
- Parameters:
mean
- The mean valuecoeffVar
- The coeffVar value- Returns:
- The distribution
-
createLognormalDistributionFromMoments
public ILognormalDistribution createLognormalDistributionFromMoments(double mean, double variance)
Description copied from interface:IContinousPDFFactory
Creates a new LognormalDistribution for doing math.- Specified by:
createLognormalDistributionFromMoments
in interfaceIContinousPDFFactory
- Parameters:
mean
- The mean valuevariance
- The variance value- Returns:
- The distribution
-
createBinomialDistribution
public IBinomialDistribution createBinomialDistribution(int trials, double probability)
Description copied from interface:IDiscretePDFFactory
Creates a new BinomialDistribution for doing math.- Specified by:
createBinomialDistribution
in interfaceIDiscretePDFFactory
- Parameters:
trials
- The trialsprobability
- The probability of success- Returns:
- The distribution
-
createPoissonDistribution
public IPoissonDistribution createPoissonDistribution(double mean)
Description copied from interface:IDiscretePDFFactory
Creates a new PoissonDistribution for doing math.- Specified by:
createPoissonDistribution
in interfaceIDiscretePDFFactory
- Parameters:
mean
- The mean- Returns:
- The distribution
-
createUniformIntDistribution
public IUniformIntDistribution createUniformIntDistribution(int a, int b)
Description copied from interface:IDiscretePDFFactory
Creates a new UniformIntDistribution for doing math.- Specified by:
createUniformIntDistribution
in interfaceIDiscretePDFFactory
- Parameters:
a
- The a valueb
- The b value- Returns:
- The distribution
-
createUniformDistribution
public IUniformDistribution createUniformDistribution(double a, double b)
Description copied from interface:IContinousPDFFactory
Creates a new UniformDistribution for doing math.- Specified by:
createUniformDistribution
in interfaceIContinousPDFFactory
- Parameters:
a
- The a valueb
- The b value- Returns:
- The distribution
-
createChiSquareDistribution
public IChiSquareDistribution createChiSquareDistribution(int degreesOfFreedom)
Description copied from interface:IContinousPDFFactory
Creates a new chi-square distribution with the specified parameter.- Specified by:
createChiSquareDistribution
in interfaceIContinousPDFFactory
- Parameters:
degreesOfFreedom
- the degrees of freedom- Returns:
- the distribution
-
createStudentTDistribution
public IStudentTDistribution createStudentTDistribution(int degreesOfFreedom)
Description copied from interface:IContinousPDFFactory
Creates a new student's t-distribution with the specified parameter.- Specified by:
createStudentTDistribution
in interfaceIContinousPDFFactory
- Parameters:
degreesOfFreedom
- the degrees of freedom- Returns:
- the distribution
-
-