E - the element typepublic class EntityDistUniform<E extends Entity> extends EntityDist<E>
Distribution| Constructor and Description |
|---|
EntityDistUniform(Model owner,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Creates a stream of entities that are equally likely.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e)
Adds an entity (type E) to the range of this distribution, unless it is
already present.
|
boolean |
contains(E e)
Checks whether an entity is present (i.e. potentially sampled) by this
distribution
|
Reporter |
createDefaultReporter()
Creates the default reporter for the EntityDistUniform distribution.
|
boolean |
remove(E e)
Removes an entity (type E) from the range of this distribution, if it is
included.
|
E |
sample()
Returns the next empirically distributed entity sample.
|
void |
setNonNegative(boolean newValue)
Overrides the same method of
desmoj.dist.Distribution. |
sampleObjectchangeRandomGenerator, getInitialSeed, getNonNegative, getNumSamples, isAntithetic, reset, reset, setAntithetic, setSeedgetCorrespondingSchedulable, getDescription, getObservations, getReporter, incrementObservations, incrementObservations, reportIsOn, reportOff, reportOn, resetAt, setCorrespondingSchedulable, setDescription, setReportercurrent, currentEntity, currentEntityAll, currentEvent, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOngetName, getQuotedName, toStringpublic EntityDistUniform(Model owner, java.lang.String name, boolean showInReport, boolean showInTrace)
owner - Model : The distribution's ownername - java.lang.String : The distribution's nameshowInReport - boolean : Flag for producing reportsshowInTrace - boolean : Flag for producing trace outputpublic Reporter createDefaultReporter()
createDefaultReporter in class DistributionEntityDistUniformReporterpublic boolean add(E e)
e - E : The entity to be added to the range of this distribution.public boolean contains(E e)
e - E : The entity to be checked.public boolean remove(E e)
e - E : The entity to be removed from the range of this
distribution.public E sample()
sample in class EntityDist<E extends Entity>public void setNonNegative(boolean newValue)
desmoj.dist.Distribution. A
warning that it makes no sense to set a EntityDistUniform to
be (not) negative is printed since the distribution samples are not
numerical.setNonNegative in class DistributionnewValue - boolean : No effect. A warning is issued.