public class DiscreteConstantDistribution extends DiscreteDistribution
Meaning: | A constant integer value \(d\) is returned |
---|---|
Parameters: | constant integer (mean) value \(d\) |
Distribution: | \(P(X=i) = \begin{cases} 1 &\mbox{for } i=d \\ 0 & \mbox{else } \end{cases} \) |
Expected value: | \(E[X]=d\) |
Variance: | \(VAR[X]=0\) |
Coefficient of variation: | \(c_X=0\) |
Generating func.: | \(G(z)=z^d \) |
Parser example: |
[...].Distribution = DiscreteConstant
|
Modifier and Type | Field and Description |
---|---|
int |
mean |
rng
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
DiscreteConstantDistribution(int mean) |
Modifier and Type | Method and Description |
---|---|
static DiscreteConstantDistribution |
createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
as required by
ReflectionConstructable |
int |
next()
Create random numbers
|
getDefaultRNG, getRandomNumberGenerator, reset
public static DiscreteConstantDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
ReflectionConstructable
public int next()
DiscreteDistribution
next
in class DiscreteDistribution