Top Inners Fields Constructors Methods
org.apache.poi.ss.formula.functions

public abstract Class AggregateFunction

extends MultiOperandNumericFunction
Class Inheritance
Known Direct Subclasses
org.apache.poi.ss.formula.functions.AggregateFunction.AggregateFunctionA, org.apache.poi.ss.formula.functions.AggregateFunction.Product, org.apache.poi.ss.formula.functions.AggregateFunction.Geomean
Imports
org.apache.commons.math3.stat.descriptive.moment.GeometricMean, org.apache.poi.ss.formula.eval.ErrorEval, .EvaluationException, .NumberEval, .OperandResolver, .ValueEval

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract static class
private static class
private static class
private static class
AggregateFunction.Percentile

Returns the k-th percentile of values in a range.

private static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function
public static final Function

Constructor Summary

AccessConstructor and Description
protected
protected
AggregateFunction(boolean isReferenceBoolCounted)

Method Summary

Modifier and TypeMethod and Description
pack-priv static Function

Returns:

wrapped instance. The actual math is delegated to the argument function.
subtotalInstance
(Function
the function to wrap
func
,
boolean countHiddenRows)

Create an instance to use in the Subtotal function.

Inherited from org.apache.poi.ss.formula.functions.MultiOperandNumericFunction:
evaluateevaluategetMaxNumOperandsgetNumberArrayisHiddenRowCountedisSubtotalCountedsetBlankEvalPolicysetMissingArgPolicytreatStringsAsZero

Field Detail

AVEDEVback to summary
public static final Function AVEDEV
AVERAGEback to summary
public static final Function AVERAGE
AVERAGEAback to summary
public static final Function AVERAGEA
DEVSQback to summary
public static final Function DEVSQ
GEOMEANback to summary
public static final Function GEOMEAN
LARGEback to summary
public static final Function LARGE
MAXback to summary
public static final Function MAX
MEDIANback to summary
public static final Function MEDIAN
MINback to summary
public static final Function MIN
PERCENTILEback to summary
public static final Function PERCENTILE
PRODUCTback to summary
public static final Function PRODUCT
SMALLback to summary
public static final Function SMALL
STDEVback to summary
public static final Function STDEV
STDEVAback to summary
public static final Function STDEVA
STDEVPback to summary
public static final Function STDEVP
STDEVPAback to summary
public static final Function STDEVPA
SUMback to summary
public static final Function SUM
SUMSQback to summary
public static final Function SUMSQ
VARback to summary
public static final Function VAR
VARAback to summary
public static final Function VARA
VARPback to summary
public static final Function VARP
VARPAback to summary
public static final Function VARPA

Constructor Detail

AggregateFunctionback to summary
protected AggregateFunction()
AggregateFunctionback to summary
protected AggregateFunction(boolean isReferenceBoolCounted)

Method Detail

subtotalInstanceback to summary
pack-priv static Function subtotalInstance(Function func, boolean countHiddenRows)

Create an instance to use in the Subtotal function.

If there are other subtotals within argument refs (or nested subtotals), these nested subtotals are ignored to avoid double counting.

Parameters
func:Function

the function to wrap

Returns:Function

wrapped instance. The actual math is delegated to the argument function.

org.apache.poi.ss.formula.functions back to summary

pack-priv abstract Class AggregateFunction.AggregateFunctionA

extends AggregateFunction
Class Inheritance

Field Summary

Inherited from org.apache.poi.ss.formula.functions.AggregateFunction:
AVEDEVAVERAGEAVERAGEADEVSQGEOMEANLARGEMAXMEDIANMINPERCENTILEPRODUCTSMALLSTDEVSTDEVASTDEVPSTDEVPASUMSUMSQVARVARAVARPVARPA

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
protected boolean
treatStringsAsZero()

Overrides org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.treatStringsAsZero.

Functions like AVERAGEA() differ from AVERAGE() in the way they handle non-numeric cells.

Inherited from org.apache.poi.ss.formula.functions.AggregateFunction:
subtotalInstance

Constructor Detail

AggregateFunctionAback to summary
protected AggregateFunctionA()

Method Detail

treatStringsAsZeroback to summary
protected boolean treatStringsAsZero()

Overrides org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.treatStringsAsZero.

Doc from org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.treatStringsAsZero.

Functions like AVERAGEA() differ from AVERAGE() in the way they handle non-numeric cells. AVERAGEA treats booleans as 1.0 (true) and 0.0 (false). String cells are treated as 0.0 (AVERAGE() ignores the cell altogether).

Returns:boolean

whether to parse non-numeric cells

Annotations
@Override
org.apache.poi.ss.formula.functions back to summary

private Class AggregateFunction.Geomean

extends AggregateFunction
Class Inheritance

Field Summary

Inherited from org.apache.poi.ss.formula.functions.AggregateFunction:
AVEDEVAVERAGEAVERAGEADEVSQGEOMEANLARGEMAXMEDIANMINPERCENTILEPRODUCTSMALLSTDEVSTDEVASTDEVPSTDEVPASUMSUMSQVARVARAVARPVARPA

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected double
Inherited from org.apache.poi.ss.formula.functions.AggregateFunction:
subtotalInstance

Constructor Detail

Geomeanback to summary
pack-priv Geomean()

Method Detail

evaluateback to summary
protected double evaluate(double[] values) throws EvaluationException

Implements abstract org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.evaluate.

Annotations
@Override
org.apache.poi.ss.formula.functions back to summary

private final Class AggregateFunction.LargeSmall

extends Fixed2ArgFunction
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final boolean

Constructor Summary

AccessConstructor and Description
protected
LargeSmall(boolean isLarge)

Method Summary

Modifier and TypeMethod and Description
public ValueEval
Inherited from org.apache.poi.ss.formula.functions.Fixed2ArgFunction:
evaluate

Field Detail

_isLargeback to summary
private final boolean _isLarge

Constructor Detail

LargeSmallback to summary
protected LargeSmall(boolean isLarge)

Method Detail

evaluateback to summary
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1)

Implements org.apache.poi.ss.formula.functions.Function2Arg.evaluate.

Doc from org.apache.poi.ss.formula.functions.Function2Arg.evaluate.

see Function#evaluate(ValueEval[], int, int)

org.apache.poi.ss.formula.functions back to summary

private final Class AggregateFunction.Percentile

extends Fixed2ArgFunction
Class Inheritance

Returns the k-th percentile of values in a range. You can use this function to establish a threshold of acceptance. For example, you can decide to examine candidates who score above the 90th percentile. PERCENTILE(array,k) Array is the array or range of data that defines relative standing. K is the percentile value in the range 0..1, inclusive. Remarks

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public ValueEval
Inherited from org.apache.poi.ss.formula.functions.Fixed2ArgFunction:
evaluate

Constructor Detail

Percentileback to summary
protected Percentile()

Method Detail

evaluateback to summary
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1)

Implements org.apache.poi.ss.formula.functions.Function2Arg.evaluate.

Doc from org.apache.poi.ss.formula.functions.Function2Arg.evaluate.

see Function#evaluate(ValueEval[], int, int)

org.apache.poi.ss.formula.functions back to summary

private Class AggregateFunction.Product

extends AggregateFunction
Class Inheritance

Field Summary

Inherited from org.apache.poi.ss.formula.functions.AggregateFunction:
AVEDEVAVERAGEAVERAGEADEVSQGEOMEANLARGEMAXMEDIANMINPERCENTILEPRODUCTSMALLSTDEVSTDEVASTDEVPSTDEVPASUMSUMSQVARVARAVARPVARPA

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected double
Inherited from org.apache.poi.ss.formula.functions.AggregateFunction:
subtotalInstance

Constructor Detail

Productback to summary
pack-priv Product()

Method Detail

evaluateback to summary
protected double evaluate(double[] values) throws EvaluationException

Implements abstract org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.evaluate.

Annotations
@Override
org.apache.poi.ss.formula.functions back to summary

pack-priv final Class AggregateFunction.ValueCollector

extends MultiOperandNumericFunction
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final AggregateFunction.ValueCollector

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static double[]
collectValues(ValueEval... operands)

protected double
Inherited from org.apache.poi.ss.formula.functions.MultiOperandNumericFunction:
evaluategetMaxNumOperandsgetNumberArrayisHiddenRowCountedisSubtotalCountedsetBlankEvalPolicysetMissingArgPolicytreatStringsAsZero

Field Detail

instanceback to summary
private static final AggregateFunction.ValueCollector instance

Constructor Detail

ValueCollectorback to summary
public ValueCollector()

Method Detail

collectValuesback to summary
public static double[] collectValues(ValueEval... operands) throws EvaluationException
evaluateback to summary
protected double evaluate(double[] values)

Implements abstract org.apache.poi.ss.formula.functions.MultiOperandNumericFunction.evaluate.