|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjartege.ThresholdProbability
The class ThresholdProbability allows to create creation
probability functions defined by a threshold value.
A creation probablity function defines
the probability of creation of an object in function of the number
of already created objects. Threshold probability functions are defined
by a threshold value which indicates when the probability
goes from 1 to 0.
theFunction(nbCreatedObjects) = 1,
if nbCreatedObjects < getThreshold() ;
theFunction(nbCreatedObjects) = 0,
if nbCreatedObjects >= getThreshold().
Constructor Summary | |
ThresholdProbability(int threshold)
Constructs a new creation probability function defined by the specified threshold. |
Method Summary | |
int |
getThreshold()
Returns the threshold of this creation probability function. |
double |
theFunction(int nbCreatedObjects)
The creation probability function. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ThresholdProbability(int threshold)
threshold
- the threshold of the creation probability function.Method Detail |
public double theFunction(int nbCreatedObjects)
theFunction
in interface CreationProbability
nbCreatedObjects
- the number of already created objects.public int getThreshold()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |