public abstract class UnivariateStats extends Object
acceptDatum(java.lang.Object, long)
and then call the various accessor methods to
get accumulated values.Modifier and Type | Class and Description |
---|---|
static interface |
UnivariateStats.ArrayStats
Aggregates statistics acquired from a column whose values are
fixed-length numeric arrays.
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_CARDINALITY
Maximum value for cardinality counters.
|
Constructor and Description |
---|
UnivariateStats() |
Modifier and Type | Method and Description |
---|---|
abstract void |
acceptDatum(Object value,
long irow)
Submits a single value to the statistics accumulator.
|
abstract void |
addStats(UnivariateStats other)
Adds the accumulated content of a second UnivariateStats object
to this one.
|
static UnivariateStats |
createStats(Class<?> clazz,
java.util.function.Supplier<Quantiler> qSupplier,
boolean doCard)
Factory method to construct an instance of this class for accumulating
particular types of values.
|
abstract UnivariateStats.ArrayStats |
getArrayStats()
Returns an object containing statistics applicable to
numeric-array-valued columns.
|
abstract int |
getCardinality()
Returns the number of distinct non-null values submitted, if known.
|
abstract long |
getCount()
Returns the number of good (non-null) values accumulated.
|
abstract Comparable<?> |
getMaximum()
Returns the maximum value submitted, if applicable.
|
abstract long |
getMaxPos()
Returns the sequence number of the maximum value submitted.
|
abstract Comparable<?> |
getMinimum()
Returns the numeric minimum value submitted, if applicable.
|
abstract long |
getMinPos()
Returns the sequence number of the minimum value submitted.
|
abstract Quantiler |
getQuantiler()
Returns a quantiler ready to provide quantile values, or null
if quantiles were not gathered.
|
abstract double |
getSum()
Returns the numeric sum of values accumulated.
|
abstract double |
getSum2()
Returns the sum of squares of values accumulated.
|
abstract double |
getSum3()
Returns the sum of cubes of values accumulated.
|
abstract double |
getSum4()
Returns the sum of fourth powers of values accumulated.
|
public static final int MAX_CARDINALITY
public abstract void acceptDatum(Object value, long irow)
value
- value objectirow
- row index of input valuepublic abstract void addStats(UnivariateStats other)
other
- compatible UnivariateStats objectpublic abstract long getCount()
public abstract double getSum()
public abstract double getSum2()
public abstract double getSum3()
public abstract double getSum4()
public abstract Comparable<?> getMinimum()
public abstract Comparable<?> getMaximum()
public abstract long getMinPos()
public abstract long getMaxPos()
public abstract int getCardinality()
public abstract Quantiler getQuantiler()
Quantiler.ready()
value will have been called on it.public abstract UnivariateStats.ArrayStats getArrayStats()
public static UnivariateStats createStats(Class<?> clazz, java.util.function.Supplier<Quantiler> qSupplier, boolean doCard)
clazz
- class of which all submitted values will be instances of
(if they're not null)qSupplier
- supplier for an object that can calculate quantiles,
or null if quantiles are not requireddoCard
- true if an attempt is to be made to count
distinct valuesCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.