|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISamplePDF
For the implementation of the SamplePDF, we used a simplified version of probability density functions to ease the following computations and analyses. The pdf is approximated by a number of sampling points, which are seperated by a fixed distance. Each sampling point contains the probability for a sample to lie in a certain interval. For example, if we have a pdf with a distance of 5 between the sampling points, the probability stored in the first point is for the interval [0, 2.5), the second for the interval [2.5, 7.5), and so on. The probabilities of the intervals [a, b) are derived from the original pdf by computing difference F(b) - F(a) of its integral, which is the the probability for a sample lying in the interval.
| Method Summary | |
|---|---|
void |
expand(int newSize)
Increases the number of sampling points. |
double |
getDistance()
Returns the distance between the sampling points. |
Complex |
getFillValue()
Returns the value used to fill unset sampling points at the end of the function. |
double |
getFillValueAsDouble()
Returns the real part of the value used to fill unset sampling points at the end of the function. |
ISamplePDF |
getFunctionWithNewDistance(double distance)
Creates a new SamplePDF that describes the same PDF, but whose sampling points are computed according to a new distance. |
Complex |
getValue(int pos)
|
Double |
getValueAsDouble(int pos)
|
List<Complex> |
getValues()
Returns the sampling points of the function as complex numbers. |
List<Double> |
getValuesAsDouble()
Returns the real part of the function's samples. |
int |
numberOfSamples()
The number of samples used to approximate the pdf. |
void |
setFillValue(Complex fillValue)
Sets the new fill value. |
void |
setFillValue(double fillValue)
Sets the real part of the fill value to fillValue and the imaginary part to zero. |
void |
setValues(List<Complex> values,
boolean isInFrequencyDomain)
Sets the sampling points of the function. |
void |
setValuesAsDouble(List<Double> values)
/** Sets the sampling points of the function. |
| Methods inherited from interface de.uka.ipd.sdq.probfunction.math.IProbabilityDensityFunction |
|---|
add, div, drawSample, getCumulativeFunction, getFourierTransform, getInverseFourierTransform, getLowerDomainBorder, greaterThan, lessThan, mult, probabilisticEquals, scale, shiftDomain, stretchDomain, sub |
| Methods inherited from interface de.uka.ipd.sdq.probfunction.math.IProbabilityFunction |
|---|
checkConstrains, getArithmeticMeanValue, getMedian, getPercentile, getProbabilitySum, getUnit, hasOrderedDomain, isInFrequencyDomain, isInTimeDomain |
| Method Detail |
|---|
void expand(int newSize)
throws SizeTooSmallException
newSize - the new number of sampling points. If newSize is smaller than
the original size, an exception is thrown.
SizeTooSmallException - Thrown if newSize is small than the current number of
elements.double getDistance()
ISamplePDF getFunctionWithNewDistance(double distance)
throws NegativeDistanceException,
FunctionNotInTimeDomainException
distance - Distance of the new function.
FunctionNotInTimeDomainException
NegativeDistanceExceptionList<Double> getValuesAsDouble()
List<Complex> getValues()
Complex getValue(int pos)
Double getValueAsDouble(int pos)
void setValuesAsDouble(List<Double> values)
values - a new list of sampling points.
ProbabilitySumNotOneException - Thrown, if the sum of the values is not one.
void setValues(List<Complex> values,
boolean isInFrequencyDomain)
values - a new list of sampling points.
ProbabilitySumNotOneException - Thrown, if the sum of the real part of the values is not one,
if the function is in the time domain (isInFrequencyDomain ==
false).double getFillValueAsDouble()
Complex getFillValue()
void setFillValue(double fillValue)
fillValue - the real part of the new fill value.void setFillValue(Complex fillValue)
fillValue - New fill value.int numberOfSamples()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||