|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaitools.numeric.AbstractProcessor
org.jaitools.numeric.ExactMedianProcessor
public class ExactMedianProcessor
Processor for the exact median Statistic.MEDIAN.
Note: this processor stores sll accepted sample values in memory in order to calculate the exact median. For very large data streams Statistic.APPROX_MEDIAN might be preferred.
Statistic,
StreamingSampleStats| Field Summary |
|---|
| Fields inherited from class org.jaitools.numeric.AbstractProcessor |
|---|
numAccepted, numNaN, numNoData, numOffered |
| Constructor Summary | |
|---|---|
ExactMedianProcessor()
|
|
| Method Summary | |
|---|---|
Double |
get(Statistic stat)
Gets the value of the statistic calculated by this processor. |
Collection<Statistic> |
getSupported()
Gets the Statistics supported by this processor. |
void |
offer(Double sample)
Offers a sample value to the processor. |
protected boolean |
update(Double sample)
Processes a sample value. |
| Methods inherited from class org.jaitools.numeric.AbstractProcessor |
|---|
addNoDataRange, addNoDataValue, addRange, addRange, get, getNoDataRanges, getNumAccepted, getNumNaN, getNumNoData, getNumOffered, getRanges, getRangesType, isAccepted, setRangesType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExactMedianProcessor()
| Method Detail |
|---|
public Collection<Statistic> getSupported()
Statistics supported by this processor.
Statisticspublic final void offer(Double sample)
Integer.MAX_VALUE (available memory permitting).
Once this limit is reached, subsequent values will be
rejected and a warning message will be logged.
offer in interface Processoroffer in class AbstractProcessorsample - the sample valueprotected boolean update(Double sample)
update in class AbstractProcessorsample - the sample value
true if the sample is accepted;
false otherwisepublic Double get(Statistic stat)
stat - the specified statistic
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||