public class BoolStatistic extends Reportable
BoolStatistic
class is providing a statistic analysis about
a boolean value. Statistics include true
-ratio and total number of observations.Constructor and Description |
---|
BoolStatistic(Model ownerModel,
java.lang.String name,
boolean showInReport,
boolean showInTrace)
Constructor for a BoolStatistic object.
|
Modifier and Type | Method and Description |
---|---|
Reporter |
createDefaultReporter()
Returns a Reporter to produce a report about this BoolStatistic.
|
long |
getTrueObs()
Returns the number of
true s observed so far. |
double |
getTrueRatio()
Returns the ratio of
true s per total observations so far. |
void |
reset()
Resets this
BoolStatistic object by deleting a observations this far. |
void |
update(boolean val)
Updates this
BoolStatistic object with a boolean double value given as
parameter. |
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 BoolStatistic(Model ownerModel, java.lang.String name, boolean showInReport, boolean showInTrace)
ValueSupplier
.ownerModel
- Model : The model this BoolStatistic is associated toname
- java.lang.String : The name of this BoolStatistic objectshowInReport
- boolean : Flag for showing the report about BoolStatistic Tally.showInTrace
- boolean : Flag for showing the trace output of BoolStatistic Tally.public Reporter createDefaultReporter()
public long getTrueObs()
true
s observed so far.true
s observed so far.public double getTrueRatio()
true
s per total observations so far.true
s per total observations so far.public void reset()
BoolStatistic
object by deleting a observations this far.reset
in class Reportable
public void update(boolean val)
BoolStatistic
object with a boolean double value given as
parameter.val
- boolean : The value with which this BoolStatistic
will
be updated.