public class DiscreteDistGeo extends DiscreteDist<java.lang.Long>
Note: The generated values are not the amount of experiments done to get the first success, but the amount of failures before the first success.
Constructor and Description |
---|
DiscreteDistGeo(Model owner,
java.lang.String name,
double probability,
boolean showInReport,
boolean showInTrace)
Creates a stream of pseudo random numbers following a Geometrical
distribution.
|
Modifier and Type | Method and Description |
---|---|
Reporter |
createDefaultReporter()
Creates the default reporter for the DiscreteDistGeo distribution.
|
java.lang.Long |
getInverseOfCumulativeProbabilityFunction(double p)
Abstract method to map a double
p from 0...1 to the
distribution's domain by determining the value x that satisfies
P(X < x) = p . |
double |
getProbability()
Returns the success probability in each separate Bernoulli experiment.
|
java.lang.Long |
sample()
Returns the next sample from this distribution.
|
sampleObject, sampleTimeSpan, sampleTimeSpan
changeRandomGenerator, getInitialSeed, getNonNegative, getNumSamples, isAntithetic, reset, reset, setAntithetic, setNonNegative, setSeed
getCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, resetAt, setCorrespondingSchedulable, setDescription, setReporter
current, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
getName, getQuotedName, toString
public DiscreteDistGeo(Model owner, java.lang.String name, double probability, boolean showInReport, boolean showInTrace)
owner
- Model : The distribution's ownername
- java.lang.String : The distribution's nameprobability
- double : The probability of success in each separate Bernoulli
experiment.showInReport
- boolean : Flag for producing reportsshowInTrace
- boolean : Flag for producing trace outputpublic Reporter createDefaultReporter()
createDefaultReporter
in class Distribution
DistributionReporter
public double getProbability()
public java.lang.Long sample()
sample
in class NumericalDist<java.lang.Long>
public java.lang.Long getInverseOfCumulativeProbabilityFunction(double p)
p
from 0...1 to the
distribution's domain by determining the value x that satisfies
P(X < x) = p
.getInverseOfCumulativeProbabilityFunction
in class NumericalDist<java.lang.Long>
p
- double: A value between 0 and 1P(X < x) = p