Class XPersistent
- java.lang.Object
-
- org.opentrafficsim.water.statistics.XTally
-
- org.opentrafficsim.water.statistics.XPersistent
-
- All Implemented Interfaces:
Serializable
public class XPersistent extends XTally
Copyright (c) 2011-2013 TU Delft, Faculty of TBM, Systems and Simulation
This software is licensed without restrictions to Nederlandse Organisatie voor Toegepast Natuurwetenschappelijk Onderzoek TNO (TNO), Erasmus University Rotterdam, Delft University of Technology, Panteia B.V., Stichting Projecten Binnenvaart, Ab Ovo Nederland B.V., Modality Software Solutions B.V., and Rijkswaterstaat - Dienst Water, Verkeer en Leefomgeving, including the right to sub-license sources and derived products to third parties.- Version:
- Mar 24, 2013
- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.opentrafficsim.water.statistics.XTally
BOTH_SIDE_CONFIDENCE, description, LEFT_SIDE_CONFIDENCE, max, min, n, RIGTH_SIDE_CONFIDENCE, semaphore, sum, varianceSum
-
-
Constructor Summary
Constructors Constructor Description XPersistent(String description, DEVSSimulatorInterface.TimeDoubleUnit simulator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getSampleMean()
Returns the sampleMean of all oberservations since the initialization.double
getSampleVariance()
Returns the current tally variance.double
getStdDev()
Returns the current tally standard deviation.void
initialize()
initializes the Tally.void
persist(double value)
dstat.int
writeToExcel(Sheet sheet, int startRow)
Write statistics to an excel spreadsheet, starting on row "startRow".-
Methods inherited from class org.opentrafficsim.water.statistics.XTally
getConfidenceInterval, getConfidenceInterval, getDescription, getMax, getMin, getN, getSum, isInitialized, tally, toString
-
-
-
-
Constructor Detail
-
XPersistent
public XPersistent(String description, DEVSSimulatorInterface.TimeDoubleUnit simulator)
- Parameters:
description
- String; description of the statisticsimulator
- DEVSSimulatorInterface.TimeDoubleUnit; the simulator
-
-
Method Detail
-
getSampleMean
public double getSampleMean()
Returns the sampleMean of all oberservations since the initialization.- Overrides:
getSampleMean
in classXTally
- Returns:
- double the sampleMean
-
getStdDev
public double getStdDev()
Returns the current tally standard deviation.
-
getSampleVariance
public double getSampleVariance()
Returns the current tally variance.- Overrides:
getSampleVariance
in classXTally
- Returns:
- double samplevariance
-
initialize
public void initialize()
initializes the Tally. This methods sets the max, min, n, sum and variance values to their initial values.- Overrides:
initialize
in classXTally
-
persist
public void persist(double value)
dstat.- Parameters:
value
- double; value
-
writeToExcel
public int writeToExcel(Sheet sheet, int startRow)
Description copied from class:XTally
Write statistics to an excel spreadsheet, starting on row "startRow".- Overrides:
writeToExcel
in classXTally
- Parameters:
sheet
- Sheet; the excel sheet to write tostartRow
- int; the first row of writing- Returns:
- first free row after writing
- See Also:
XTally.writeToExcel(org.apache.poi.ss.usermodel.Sheet, int)
-
-