public class ContDistAggregate extends ContDist
Constructor and Description |
---|
ContDistAggregate(Model owner,
java.lang.String name,
java.util.List<NumericalDist<?>> dists,
Operator operator,
boolean showInReport,
boolean showInTrace)
Creates a stream of pseudo random numbers following a distribution that
is specified by a list of other distributions and an operator to aggregate them.
|
ContDistAggregate(Model owner,
java.lang.String name,
NumericalDist<?> dist1,
NumericalDist<?> dist2,
Operator operator,
boolean showInReport,
boolean showInTrace)
Creates a stream of pseudo random numbers following a distribution that
is specified by two other distributions and an operator to aggregate them.
|
Modifier and Type | Method and Description |
---|---|
Reporter |
createDefaultReporter()
Creates the default reporter for the ContDistAggregate distribution.
|
java.util.List<NumericalDist<?>> |
getDists()
Returns the first input distribution.
|
java.lang.Double |
getInverseOfCumulativeProbabilityFunction(double p)
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 . |
Operator |
getOperator()
The Operator used to combine the input distributions.
|
java.lang.Double |
sample()
Returns the next sample from this distribution.
|
sampleTimeSpan, sampleTimeSpan
sampleObject
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 ContDistAggregate(Model owner, java.lang.String name, java.util.List<NumericalDist<?>> dists, Operator operator, boolean showInReport, boolean showInTrace)
Note that since it is possible to combine distributions of different return types, this distribution will always cast their results to double and return a double itself.
owner
- Model : The distribution's ownername
- java.lang.String : The distribution's namedists
- Listoperator
- Operator : The operator to be used to aggregate the
distributions.showInReport
- boolean : Flag for producing reportsshowInTrace
- boolean : Flag for producing trace outputpublic ContDistAggregate(Model owner, java.lang.String name, NumericalDist<?> dist1, NumericalDist<?> dist2, Operator operator, boolean showInReport, boolean showInTrace)
Note that since it is possible to combine distributions of different return types, this distribution will always cast their results to double and return a double itself.
owner
- Model : The distribution's ownername
- java.lang.String : The distribution's namedist1
- NumericalDist> : The first input distribution.dist2
- NumericalDist> : The second input distribution.operator
- Operator : The operator to be used to combine the two
distributions.showInReport
- boolean : Flag for producing reportsshowInTrace
- boolean : Flag for producing trace outputpublic Reporter createDefaultReporter()
createDefaultReporter
in class Distribution
ContDistAggregateReporter
public java.util.List<NumericalDist<?>> getDists()
public Operator getOperator()
public java.lang.Double sample()
Evaluation is done from left to right, e.g. for three distributions, the
results is (dist1.sample x d2.sample()) x d3.sample()
,
where x
is the operation used.
sample
in class NumericalDist<java.lang.Double>
public java.lang.Double getInverseOfCumulativeProbabilityFunction(double p)
p
from 0...1 to the
distribution's domain by determining the value x that satisfies
P(X < x) = p
. Not supported, i.e. throwing an
UnsupportedOperationException
.getInverseOfCumulativeProbabilityFunction
in class NumericalDist<java.lang.Double>
p
- double: A value between 0 and 1UnsupportedOperationException
exception