DataPipe, DataPipeForked, IDataSink, IDataSourcepublic 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, standardDeviationactive, hasUnpushedData, pushInterval, putCountdataInfo, 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, statChoicesgetPushInterval, isActive, processData, setActive, setPushInterval, toStringgetDataInfo, getTag, putData, putDataInfoaddDataSink, getDataSink, getDataSinks, removeDataSink, setDataSink, setDataSinksputData, putDataInfogetDataInfo, getTagprotected 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 DataAccumulatordata - the data to be processedprotected void doBlockSum()
public IData getData()
getData in interface IDataSourcegetData in class DataAccumulatorpublic void reset()
reset in class AccumulatorAveragepublic IDataInfo processDataInfo(IDataInfo incomingDataInfo)
processDataInfo in class AccumulatorAverageincomingDataInfo - the DataInfo instance for the data that will be given to
addDatapublic void setFile(java.lang.String fname)
public void closeFile()