|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.geosolutions.jaiext.stats.Statistics
public abstract class Statistics
This abstract class is used for containing some of the possible statistical operators used by the StatisticsOpImage
class. Every
statistical operator is defined by its Statistics.StatsType
and if 2 operators are equal, they can be combined into one with the "accumulateStats()"
method. This method checks if the 2 operators belong to the same type and then sum the statistics. For updating the statistics 2 different methods
are used, one for data types without NaN values and the other for data types with them. Finally the result is returned as Object in the case that
multiple results are calculated.
Nested Class Summary | |
---|---|
static class |
Statistics.StatsType
This enum is used for organizing the various kinds of statistics and giving them an identifier used by the StatsFactory create methods. |
Field Summary | |
---|---|
protected long |
samples
Internal variable storing the number of all samples |
static String |
STATS_PROPERTY
Statistics property name |
protected Statistics.StatsType |
type
Variable indicating the statistic used |
Constructor Summary | |
---|---|
Statistics()
|
Method Summary | |
---|---|
protected abstract void |
accumulateStats(Statistics stats)
This method is used for accumulating the statistics from another Statistics object |
abstract void |
addSample(double sample)
This method adds a Double value to the statistics and updates them |
protected void |
checkSameStats(Statistics stats)
This method checks if the provided Statistics object belong to the same subclass of the current object |
protected abstract void |
clearStats()
This method is used for clearing the results |
abstract Long |
getNumSamples()
This method returns the number of samples calculated |
abstract Object |
getResult()
This method returns the statistic result |
protected Statistics.StatsType |
getStatsType()
This method returns the statistical type of the object instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String STATS_PROPERTY
protected Statistics.StatsType type
protected long samples
Constructor Detail |
---|
public Statistics()
Method Detail |
---|
protected Statistics.StatsType getStatsType()
protected void checkSameStats(Statistics stats)
stats
- Statistics object to comparepublic abstract void addSample(double sample)
sample
- sample value used for updating statisticsprotected abstract void accumulateStats(Statistics stats)
stats
- Statistics object to add to the current objectpublic abstract Object getResult()
protected abstract void clearStats()
public abstract Long getNumSamples()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |