|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IProbabilityMassFunction
A probability mass function (abbreviated pmf) gives the probability that a discrete random variable is exactly equal to some value. A probability mass function differs from a probability density function in that the values of the latter, defined only for continuous random variables, are not probabilities; rather, its integral over a set of possible values of the random variable is a probability.
| Method Summary | |
|---|---|
IProbabilityMassFunction |
add(IProbabilityMassFunction pmf)
Adds the probabilities of two probability mass functions (pmf) on a 'per value' basis. h(x) = f(x) + g(x) (f = this, g = parameter pmf) For the addition, the domains of both pmfs have to be equal. |
IProbabilityMassFunction |
div(IProbabilityMassFunction pmf)
Divides the probabilities of two probability mass functions (pmf) on a 'per value' basis. h(x) = f(x) / g(x) (f = this, g = parameter pmf) For the division, the domains of both pmfs have to be equal. |
Object |
drawSample()
Generates a random number of the probability function's domain, whose distribution is defined by the probability function. |
IProbabilityMassFunction |
getCumulativeFunction()
returns the cumulative probability function associated with this probability function. |
IProbabilityMassFunction |
getFourierTramsform()
Computes the Fourier transform of the probability mass function. |
IProbabilityMassFunction |
getInverseFourierTransform()
Computes the inverse Fourier transform of the probability mass function. |
List<ISample> |
getSamples()
List of samples describing the pmf. |
boolean |
haveSameDomain(IProbabilityMassFunction pmf)
|
IProbabilityMassFunction |
mult(IProbabilityMassFunction pmf)
Multiplies the probabilities of two probability mass functions (pmf) on a 'per value' basis. h(x) = f(x) * g(x) (f = this, g = parameter pmf) For the multiplication, the domains of both pmfs have to be equal. |
IProbabilityMassFunction |
scale(double scalar)
Scales the probabilities of a probability mass functions (pmf) on a 'per value' basis. h(x) = a * f(x) (f = this, a = parameter scalar) |
void |
setSamples(List<ISample> samples)
List of samples describing the pmf. |
IProbabilityMassFunction |
shiftDomain(double scalar)
Shifts each value of the PMF by the given scalar (i.e., adds the given scalar to each value). |
IProbabilityMassFunction |
stretchDomain(double scalar)
Stretches the domain of the PMF by the given scalar (i.e, multiplies each value with the given scalar). |
IProbabilityMassFunction |
sub(IProbabilityMassFunction pmf)
Substracts the probabilities of two probability mass functions (pmf) on a 'per value' basis. h(x) = f(x) - g(x) (f = this, g = parameter pmf) For the substraction, the domains of both pmfs have to be equal. |
| Methods inherited from interface de.uka.ipd.sdq.probfunction.math.IProbabilityFunction |
|---|
checkConstrains, getArithmeticMeanValue, getMedian, getPercentile, getProbabilitySum, getUnit, hasOrderedDomain, isInFrequencyDomain, isInTimeDomain |
| Method Detail |
|---|
Object drawSample()
IProbabilityMassFunction add(IProbabilityMassFunction pmf)
throws DifferentDomainsException
pmf - Function to add.
DifferentDomainsException - if the domains of both function differ.
IProbabilityMassFunction sub(IProbabilityMassFunction pmf)
throws DifferentDomainsException
pmf - Function to substract.
DifferentDomainsException - if the domains of both function differ.
IProbabilityMassFunction mult(IProbabilityMassFunction pmf)
throws DifferentDomainsException
pmf - Function to multiply with.
DifferentDomainsException - if the domains of both function differ.
IProbabilityMassFunction div(IProbabilityMassFunction pmf)
throws DifferentDomainsException
pmf - Function to divide by.
DifferentDomainsException - if the domains of both function differ.IProbabilityMassFunction scale(double scalar)
scalar - the value to scale the probabilities.
IProbabilityMassFunction shiftDomain(double scalar)
throws DomainNotNumbersException
scalar -
DomainNotNumbersException
IProbabilityMassFunction stretchDomain(double scalar)
throws DomainNotNumbersException
scalar -
DomainNotNumbersException
IProbabilityMassFunction getFourierTramsform()
throws FunctionNotInTimeDomainException
FunctionNotInTimeDomainException
IProbabilityMassFunction getInverseFourierTransform()
throws FunctionNotInFrequencyDomainException
FunctionNotInFrequencyDomainExceptionList<ISample> getSamples()
void setSamples(List<ISample> samples)
samples - New list of samples describing the pmf.
ProbabilitySumNotOneException - Thrown if the sum of the samples probabilities is not one.boolean haveSameDomain(IProbabilityMassFunction pmf)
pmf -
IProbabilityMassFunction getCumulativeFunction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||