public class TimeTruncatedTallyStat extends SimpleStatsTally
Modifier and Type | Class and Description |
---|---|
class |
TimeTruncatedTallyStat.Truncate
This class schedules a Truncate event at time given by truncationTime
|
Modifier and Type | Field and Description |
---|---|
protected SimpleStatsTally |
statsAtTruncation |
protected boolean |
truncated |
private double |
truncationTime |
private TimeTruncatedTallyStat.Truncate |
truncator |
count, DEFAULT_NAME, DEFAULT_NUMBER_FORMAT, maxObs, minObs, name, numberFormat
EOL
Constructor and Description |
---|
TimeTruncatedTallyStat(double truncationTime)
Instantiate a TimeTruncatedTallyStat with given truncation time and
default state name
|
TimeTruncatedTallyStat(java.lang.String stateName,
double truncationTime)
Instantiate a TimeTruncatedTallyStat with given stateName and truncation
time
|
Modifier and Type | Method and Description |
---|---|
SimpleStatsTally |
getStatsAtTruncation() |
double |
getTruncationTime() |
boolean |
isTruncated() |
void |
newObservation(double x)
Update counters with a new observation.
|
void |
reset()
Should reset/initialize all relevant counters.
|
void |
setEventList(BasicEventList eventList) |
void |
setTruncationTime(double truncationTime) |
java.lang.String |
toString()
Return a String containing the Name, SamplingType, and the DataLine for
this SampleStatistic.
|
void |
transientReset() |
getMean, getSamplingType, getStandardDeviation, getVariance
clone, getCount, getDataLine, getMaxObs, getMinObs, getName, newObservation, newObservation, newObservation, propertyChange, setName, setNumberFormat, setSamplingType
private double truncationTime
protected boolean truncated
private TimeTruncatedTallyStat.Truncate truncator
protected SimpleStatsTally statsAtTruncation
public TimeTruncatedTallyStat(java.lang.String stateName, double truncationTime)
stateName
- Name of state (property) to listen fortruncationTime
- Time to truncate (reset statistics)public TimeTruncatedTallyStat(double truncationTime)
truncationTime
- Time to truncate (reset statistics)public void newObservation(double x)
SimpleStatsTally
newObservation
in interface SampleStatistics
newObservation
in class SimpleStatsTally
x
- The new (primitive) observation.public void reset()
SampleStatistics
reset
in interface SampleStatistics
reset
in class SimpleStatsTally
public void transientReset()
public double getTruncationTime()
public final void setTruncationTime(double truncationTime)
truncationTime
- the truncationTime to setjava.lang.IllegalArgumentException
- if truncationTime ≤ 0.0public boolean isTruncated()
public java.lang.String toString()
AbstractSimpleStats
toString
in class AbstractSimpleStats
AbstractSimpleStats.getDataLine()
public void setEventList(BasicEventList eventList)
public SimpleStatsTally getStatsAtTruncation()