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, numberFormatEOL| 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, getVarianceclone, getCount, getDataLine, getMaxObs, getMinObs, getName, newObservation, newObservation, newObservation, propertyChange, setName, setNumberFormat, setSamplingTypeprivate 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)
SimpleStatsTallynewObservation in interface SampleStatisticsnewObservation in class SimpleStatsTallyx - The new (primitive) observation.public void reset()
SampleStatisticsreset in interface SampleStatisticsreset in class SimpleStatsTallypublic 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()
AbstractSimpleStatstoString in class AbstractSimpleStatsAbstractSimpleStats.getDataLine()public void setEventList(BasicEventList eventList)
public SimpleStatsTally getStatsAtTruncation()