public abstract class AbstractProcessor extends Object implements Processor
StreamingSampleStats.| Constructor and Description |
|---|
AbstractProcessor()
Default constructor.
|
AbstractProcessor(Range.Type rangesType)
Creates a new processor with specified use of
Ranges. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitget, getSupportedpublic 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.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<java.lang.Double>)public final long getNumOffered()
getNumOffered in interface Processorpublic final long getNumAccepted()
getNumAccepted in interface Processorpublic long getNumNaN()
public void offer(Double sample)
public Map<Statistic,Double> get()
public void addRange(Range<Double> range)
public void addRange(Range<Double> range, Range.Type rangesType)
public List<Range<Double>> getRanges()
Ranges of sample values excluded from/included in calculations.public 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 valuepublic long getNumNoData()
getNumNoData in interface ProcessorProcessor.addNoDataRange(org.jaitools.numeric.Range),
Processor.addNoDataValue(java.lang.Double)Copyright © 2009–2018. All rights reserved.