DataPipe
, DataPipeForked
, IDataSink
, IDataSource
public class AccumulatorAverageBlocklessSlim extends DataAccumulator
This accumulator accepts any type of Data
Modifier and Type | Class | Description |
---|---|---|
static class |
AccumulatorAverageBlocklessSlim.StatType |
Enumerated type that can be used to indicated the statistic to be taken
from the accumulator (e.g., average, error, current value, etc.).
|
Modifier and Type | Field | Description |
---|---|---|
static AccumulatorAverageBlocklessSlim.StatType |
AVERAGE |
|
protected long |
count |
|
protected IDataInfo |
inDataInfo |
|
protected static IFunction |
negativeChop |
|
static AccumulatorAverageBlocklessSlim.StatType |
STANDARD_DEVIATION |
|
protected IData |
sum |
|
protected IData |
sumSquare |
|
protected IData |
work |
active, hasUnpushedData, pushInterval, putCount
dataInfo, dataSink, tag
Constructor | Description |
---|---|
AccumulatorAverageBlocklessSlim() |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addData(IData data) |
Add the given values to the sums and block sums.
|
IData |
getData() |
Returns a DataGroup with Data instances holding the statistics kept by
this accumulator (as described in general comments for this class).
|
AccumulatorAverageBlockless.AllData |
getRawData() |
|
long |
getSampleCount() |
|
protected IDataInfo |
processDataInfo(IDataInfo inputDataInfo) |
Informs this DataProcessor of the DataInfo for the Data it will be
processing.
|
void |
putDataInfo(IDataInfo inputDataInfo) |
Prepares the accumulator for input data.
|
void |
reset() |
Resets all sums to zero.
|
void |
setRawData(AccumulatorAverageBlockless.AllData ad) |
|
static AccumulatorAverageBlocklessSlim.StatType[] |
statChoices() |
getPushInterval, isActive, processData, setActive, setPushInterval, toString
getDataInfo, getTag, putData
addDataSink, getDataSink, getDataSinks, removeDataSink, setDataSink, setDataSinks
getDataInfo, getTag
public static final AccumulatorAverageBlocklessSlim.StatType AVERAGE
public static final AccumulatorAverageBlocklessSlim.StatType STANDARD_DEVIATION
protected IDataInfo inDataInfo
protected long count
protected IData sum
protected IData sumSquare
protected IData work
protected static final IFunction negativeChop
public boolean addData(IData data)
addData
in class DataAccumulator
data
- the data to be processedpublic IData getData()
getData
in interface IDataSource
getData
in class DataAccumulator
public void reset()
reset
in class DataAccumulator
public void putDataInfo(IDataInfo inputDataInfo)
putDataInfo
in interface IDataSink
putDataInfo
in class DataProcessor
inputDataInfo
- the DataInfo instance for the data that will be given to
addDataprotected IDataInfo processDataInfo(IDataInfo inputDataInfo)
DataProcessor
processDataInfo
in class DataProcessor
inputDataInfo
- the DataInfo of the Data that will be input to this
DataProcessorpublic long getSampleCount()
public static AccumulatorAverageBlocklessSlim.StatType[] statChoices()
public AccumulatorAverageBlockless.AllData getRawData()
public void setRawData(AccumulatorAverageBlockless.AllData ad)