public abstract class AbstractClosedFormIntegerDistribution extends AbstractClosedFormUnivariateDistribution<java.lang.Number> implements ClosedFormDiscreteUnivariateDistribution<java.lang.Number>, IntegerDistribution
Constructor and Description |
---|
AbstractClosedFormIntegerDistribution()
Creates a new
AbstractClosedFormIntegerDistribution . |
Modifier and Type | Method and Description |
---|---|
int[] |
sampleAsInts(java.util.Random random,
int sampleCount)
Samples values from this distribution as an array of ints.
|
void |
sampleInto(java.util.Random random,
int[] output,
int start,
int length)
Samples values from this distribution as an array of ints.
|
clone
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCDF
getMaxSupport, getMeanAsDouble, getMinSupport, getVariance
getMean
sample, sample, sampleInto
clone, convertFromVector, convertToVector
sampleAsInt
getDomain, getDomainSize, getProbabilityFunction
public AbstractClosedFormIntegerDistribution()
AbstractClosedFormIntegerDistribution
.public int[] sampleAsInts(java.util.Random random, int sampleCount)
IntegerDistribution
sampleAsInts
in interface IntegerDistribution
random
- Random number generator to use.sampleCount
- The number of values to sample. Cannot be negativepublic void sampleInto(java.util.Random random, int[] output, int start, int length)
IntegerDistribution
sampleInto
in interface IntegerDistribution
random
- Random number generator to use.output
- The array to write the result into. Cannot be null.start
- The offset in the array to start writing at. Cannot be negative.length
- The number of values to sample. Cannot be negative.