|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjartege.ConstantProbability
The class ConstantProbability allows to create creation
probability functions which are constant.
A creation probablity function defines
the probability of creation of an object in function of the number
of already created objects. This probability is constant.
theFunction(nbCreatedObjects) = constant value.
Constructor Summary | |
ConstantProbability(double constant)
Constructs a new creation probability function defined by the specified constant. |
Method Summary | |
double |
getConstant()
Returns the constant probability of this constant 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 ConstantProbability(double constant)
constant
- the constant value of the constant probability function.Method Detail |
public double theFunction(int nbCreatedObjects)
theFunction(nbCreatedObjects) = constant value.
theFunction
in interface CreationProbability
nbCreatedObjects
- the number of already created objects.public double getConstant()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |