public class DiscreteGeneralDistribution extends DiscreteDistribution
Meaning: | The first \(n\) values \(p_i (i = 0, ... , n-1 )\) of the distribution are defined separately |
---|---|
Parameters: | single probabilities \(p_i (0 \le p_i \le 1 )\) |
Distribution: | \(P(X=i) = \begin{cases} p_i &\mbox{for } 0 \le i < n \\ 0 & \mbox{else } \end{cases} \) |
Expected value: | \(E[X]=\sum\limits_{ i=0 }^{ n-1 } p_i \cdot i \) |
Variance: | \(VAR[X]=\sum\limits_{ i=0 }^{ n-1 } p_i \cdot i^2-(E[X])^2\) |
Coefficient of variation: | \(c_T=\frac{ \sqrt{ VAR[X] } }{ E[X] }\) |
Generating func.: | \(G(z)=\sum\limits_{ i=0 }^{ n-1 } p_i \cdot z^i \) |
Parser example: |
[...].Distribution = DiscreteGeneral
|
Modifier and Type | Field and Description |
---|---|
ProbabilityVector |
vector |
rng
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
DiscreteGeneralDistribution(double[] probVector) |
DiscreteGeneralDistribution(double[] probVector,
RandomNumberGenerator rng) |
DiscreteGeneralDistribution(java.util.List<java.lang.Double> probVector) |
DiscreteGeneralDistribution(java.util.List<java.lang.Double> probVector,
RandomNumberGenerator rng) |
Modifier and Type | Method and Description |
---|---|
static DiscreteGeneralDistribution |
createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
as required by
ReflectionConstructable |
int |
next()
Create random numbers
|
getDefaultRNG, getRandomNumberGenerator, reset
public final ProbabilityVector vector
public DiscreteGeneralDistribution(double[] probVector, RandomNumberGenerator rng)
public DiscreteGeneralDistribution(double[] probVector)
public DiscreteGeneralDistribution(java.util.List<java.lang.Double> probVector, RandomNumberGenerator rng)
public DiscreteGeneralDistribution(java.util.List<java.lang.Double> probVector)
public static DiscreteGeneralDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
ReflectionConstructable
public int next()
DiscreteDistribution
next
in class DiscreteDistribution