DataPipe
, DataPipeForked
, IDataSink
, IDataSource
public class AccumulatorAverageFixedOutputFile extends AccumulatorAverage
This accumulator accepts any type of Data
AccumulatorAverage.StatType
Modifier and Type | Field | Description |
---|---|---|
protected long |
blockCounter |
|
protected IData |
correlationSum |
|
protected IData |
currentBlockSum |
|
protected java.io.FileWriter |
fileWriter |
|
protected IData |
firstBlock |
|
protected IData |
mostRecentBlock |
|
protected IFunction |
negativeChop |
|
protected IData |
sum |
|
protected IData |
sumBlockSquare |
|
protected IData |
sumSquare |
|
protected boolean |
toWriteFile |
|
protected IData |
work |
average, AVERAGE, BLOCK_CORRELATION, blockCorrelation, blockCountDown, blockSize, count, dataGroup, doIncludeACInError, error, ERROR, MOST_RECENT, mostRecent, STANDARD_DEVIATION, standardDeviation
active, hasUnpushedData, pushInterval, putCount
dataInfo, dataSink, tag
Constructor | Description |
---|---|
AccumulatorAverageFixedOutputFile() |
Default constructor sets block size to Default value, and sets the
interval for pushing the output data (pushInterval) to 100.
|
AccumulatorAverageFixedOutputFile(int blockSize) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addData(IData data) |
Add the given values to the sums and block sums.
|
void |
closeFile() |
|
protected void |
doBlockSum() |
Performs the block sum after blockSize calls to addData.
|
IData |
getData() |
Returns a DataGroup with Data instances holding the statistics kept by
this accumulator (as described in general comments for this class).
|
IDataInfo |
processDataInfo(IDataInfo incomingDataInfo) |
Prepares the accumulator for input data.
|
void |
reset() |
Resets all sums to zero.
|
void |
setFile(java.lang.String fname) |
addDataSink, doIncludeACInError, getBlockCount, getBlockSize, getData, getSampleCount, getTag, setBlockSize, setIncludeACInError, statChoices
getPushInterval, isActive, processData, setActive, setPushInterval, toString
getDataInfo, getTag, putData, putDataInfo
addDataSink, getDataSink, getDataSinks, removeDataSink, setDataSink, setDataSinks
putData, putDataInfo
getDataInfo, getTag
protected IData sum
protected IData sumBlockSquare
protected IData currentBlockSum
protected IData sumSquare
protected IData mostRecentBlock
protected IData correlationSum
protected IData firstBlock
protected IData work
protected final IFunction negativeChop
protected java.io.FileWriter fileWriter
protected boolean toWriteFile
protected long blockCounter
public AccumulatorAverageFixedOutputFile()
public AccumulatorAverageFixedOutputFile(int blockSize)
public boolean addData(IData data)
addData
in class DataAccumulator
data
- the data to be processedprotected void doBlockSum()
public IData getData()
getData
in interface IDataSource
getData
in class DataAccumulator
public void reset()
reset
in class AccumulatorAverage
public IDataInfo processDataInfo(IDataInfo incomingDataInfo)
processDataInfo
in class AccumulatorAverage
incomingDataInfo
- the DataInfo instance for the data that will be given to
addDatapublic void setFile(java.lang.String fname)
public void closeFile()