public class FlooredDistribution extends DiscreteDistribution
Meaning: | The "floored distribution" is a discrete distribution that converts the
value obtained from a continuous ("base") distribution to an integer value
using the
floor() function from the Java
Math package.
floor(x)
implements the floor operator \(\left \lfloor x \right \rfloor\), i.e. it
yields the largest integer value not greater than \(x\). |
---|---|
Parameters: | continuous base distribution \(f(x)\) (DF \(F(x)\)) |
Distribution: | \(P(X=i) = F(i+1)-F(i)\) |
Parser example: |
[...].Distribution = FlooredDistribution
|
Modifier and Type | Field and Description |
---|---|
ContinuousDistribution |
baseDist |
rng
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
FlooredDistribution(ContinuousDistribution baseDist) |
Modifier and Type | Method and Description |
---|---|
static FlooredDistribution |
createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
as required by
ReflectionConstructable |
int |
next()
Returns the floored value of the base distribution or
Integer.MIN/MAX_VALUE if the value exceeds the integer range. |
getDefaultRNG, getRandomNumberGenerator, reset
public final ContinuousDistribution baseDist
public FlooredDistribution(ContinuousDistribution baseDist)
public static FlooredDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
ReflectionConstructable
public int next()
Integer.MIN/MAX_VALUE
if the value exceeds the integer range.next
in class DiscreteDistribution