|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaitools.numeric.AbstractProcessor
public abstract class AbstractProcessor
Abstract base class for statistics processors used with StreamingSampleStats.
| Field Summary | |
|---|---|
protected long |
numAccepted
Number of samples accepted. |
protected long |
numNaN
Number of NaN samples offered. |
protected long |
numNoData
Number of NODATA samples offered. |
protected long |
numOffered
Number of samples offered. |
| Constructor Summary | |
|---|---|
AbstractProcessor()
Default constructor. |
|
AbstractProcessor(Range.Type rangesType)
Creates a new processor with specified use of Ranges. |
|
| Method Summary | |
|---|---|
void |
addNoDataRange(Range<Double> noData)
Sets a range of values to be considered as NoData. |
void |
addNoDataValue(Double noData)
Convenience method to specify a single value to be considered as NoData. |
void |
addRange(Range<Double> range)
Sets a range of values to exclude from or include in from calculations. |
void |
addRange(Range<Double> range,
Range.Type rangesType)
Sets a range of values to exclude from or include in calculations. |
Map<Statistic,Double> |
get()
Gets the value of all statistics calculated by this processor. |
List<Range<Double>> |
getNoDataRanges()
Gets the ranges of sample values to be considered as NoData. |
long |
getNumAccepted()
Gets the number of samples that have been accepted by this processor (ie. |
long |
getNumNaN()
Gets the number of NaN samples passed to the processor |
long |
getNumNoData()
Gets the number of NoData samples passed to the processor. |
long |
getNumOffered()
Gets the number of samples that have been offered to this processor. |
List<Range<Double>> |
getRanges()
Gets the Ranges of sample values excluded from/included in calculations. |
Range.Type |
getRangesType()
Gets the type of ranges being used by this processor. |
boolean |
isAccepted(Double sample)
Tests whether a sample value will be accepted for calculations by the processor. |
void |
offer(Double sample)
Offers a sample value to the processor. |
void |
setRangesType(Range.Type rangesType)
Sets the type of the ranges to be added to the processor. |
protected abstract boolean |
update(Double sample)
Processes a sample value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jaitools.numeric.Processor |
|---|
get, getSupported |
| Field Detail |
|---|
protected long numOffered
protected long numAccepted
protected long numNaN
protected long numNoData
| Constructor Detail |
|---|
public AbstractProcessor()
public AbstractProcessor(Range.Type rangesType)
Ranges.
rangesType - normally either Range.Type.INCLUDE to indicate that
Ranges will define values to operate on, or Range.Type.EXCLUDE
when Ranges will define values to exclude from operations.| Method Detail |
|---|
public void addNoDataRange(Range<Double> noData)
NoData ranges take precedence over included / excluded data ranges.
addNoDataRange in interface ProcessornoData - a range of values to be excludedpublic void addNoDataValue(Double noData)
addNoDataValue in interface ProcessornoData - the value to be treated as NoDataProcessor.addNoDataRange(org.jaitools.numeric.Range) public final long getNumOffered()
getNumOffered in interface Processorpublic final long getNumAccepted()
getNumAccepted in interface Processorpublic long getNumNaN()
getNumNaN in interface Processorpublic void offer(Double sample)
offer in interface Processorsample - the sample valuepublic Map<Statistic,Double> get()
get in interface Processorprotected abstract boolean update(Double sample)
sample - the sample value
true if the sample is accepted;
false otherwisepublic void addRange(Range<Double> range)
addRange in interface Processorrange - the range
public void addRange(Range<Double> range,
Range.Type rangesType)
addRange in interface Processorrange - the rangerangesType - the type of rangepublic List<Range<Double>> getRanges()
Ranges of sample values excluded from/included in calculations.
getRanges in interface ProcessorRanges or an empty list if no ranges are definedpublic List<Range<Double>> getNoDataRanges()
getNoDataRanges in interface ProcessorRanges or an empty list if no NoData are definedpublic void setRangesType(Range.Type rangesType)
setRangesType in interface ProcessorrangesType - the type of range.public final Range.Type getRangesType()
getRangesType in interface Processorpublic boolean isAccepted(Double sample)
isAccepted in interface Processorsample - the sample value
public long getNumNoData()
getNumNoData in interface ProcessorProcessor.addNoDataRange(org.jaitools.numeric.Range),
Processor.addNoDataValue(java.lang.Double)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||