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.RandomAccessFile
myData
protected java.io.File
myDataFile
protected java.io.PrintWriter
myMetaData
protected java.io.File
myMetaDataFile
-
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 void
cleanUpCollector()
Should be executed once after all replications have been observedvoid
collect(double time, double value)
java.io.File
getDataFile()
The file made for the raw datajava.io.File
getDirectory()
The directory for the filesjava.lang.String
getFileName()
The base file name for the filesjava.io.File
getMetaDataFile()
The file handle for the meta data file.java.lang.String
getWelchFileMetaDataBeanAsJson()
WelchDataFileAnalyzer
makeWelchDataFileAnalyzer()
Makes a WelchDataFileAnalyzer based on the file in this collectorWelchFileMetaDataBean
makeWelchFileMetaDataBean()
java.lang.String
toString()
-
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:
toString
in 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:WelchDataCollectorIfc
Should be executed once after all replications have been observed
-
-