Package jsl.utilities.statistic.welch
Class WelchDataFileCollector
- java.lang.Object
-
- jsl.utilities.statistic.welch.AbstractWelchDataCollector
-
- jsl.utilities.statistic.welch.WelchDataFileCollector
-
- All Implemented Interfaces:
WelchDataCollectorIfc
public class WelchDataFileCollector extends AbstractWelchDataCollector
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.RandomAccessFilemyDataprotected java.io.FilemyDataFileprotected java.io.PrintWritermyMetaDataprotected java.io.FilemyMetaDataFile-
Fields inherited from class jsl.utilities.statistic.welch.AbstractWelchDataCollector
myAveragesForReps, myAvgTBOForReps, myBatchSize, myLastTime, myLastValue, myName, myObsCount, myObsCountsForReps, myRepStat, myStatType, myTBOStats, myTimeOfLastObsForReps, myWithinRepStats
-
-
Constructor Summary
Constructors Constructor Description WelchDataFileCollector(java.nio.file.Path pathToDirectory, StatisticType statisticType, java.lang.String name, double batchSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUpCollector()Should be executed once after all replications have been observedvoidcollect(double time, double value)java.io.FilegetDataFile()The file made for the raw datajava.io.FilegetDirectory()The directory for the filesjava.lang.StringgetFileName()The base file name for the filesjava.io.FilegetMetaDataFile()The file handle for the meta data file.java.lang.StringgetWelchFileMetaDataBeanAsJson()WelchDataFileAnalyzermakeWelchDataFileAnalyzer()Makes a WelchDataFileAnalyzer based on the file in this collectorWelchFileMetaDataBeanmakeWelchFileMetaDataBean()java.lang.StringtoString()-
Methods inherited from class jsl.utilities.statistic.welch.AbstractWelchDataCollector
beginReplication, endReplication, getAvgTimeBtwObservationsForEachReplication, getBatchSize, getLastTime, getLastValue, getNumberOfObservationsForEachReplication, getNumberOfReplications, getReplicationAverages, getTimeOfLastObservationForReps, setUpCollector
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jsl.utilities.statistic.welch.WelchDataCollectorIfc
getMinNumberOfObservationsAcrossReplications
-
-
-
-
Constructor Detail
-
WelchDataFileCollector
public WelchDataFileCollector(java.nio.file.Path pathToDirectory, StatisticType statisticType, java.lang.String name, double batchSize)
-
-
Method Detail
-
getDirectory
public java.io.File getDirectory()
The directory for the files- Returns:
- the directory for the file
-
getFileName
public java.lang.String getFileName()
The base file name for the files- Returns:
- the base file name
-
makeWelchDataFileAnalyzer
public WelchDataFileAnalyzer makeWelchDataFileAnalyzer()
Makes a WelchDataFileAnalyzer based on the file in this collector- Returns:
- a WelchDataFileAnalyzer
-
getDataFile
public java.io.File getDataFile()
The file made for the raw data- Returns:
- a file with the raw data
-
getMetaDataFile
public java.io.File getMetaDataFile()
The file handle for the meta data file. The meta data file contains the number of replications as the first line, and the number of observations in each of the replications as the subsequent lines- Returns:
- the meta data file
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
collect
public void collect(double time, double value)- Parameters:
time- the time that the observation occurredvalue- the value of the observation at the observed time
-
makeWelchFileMetaDataBean
public WelchFileMetaDataBean makeWelchFileMetaDataBean()
-
getWelchFileMetaDataBeanAsJson
public java.lang.String getWelchFileMetaDataBeanAsJson()
-
cleanUpCollector
public void cleanUpCollector()
Description copied from interface:WelchDataCollectorIfcShould be executed once after all replications have been observed
-
-