Class VarSAggregator<V extends java.lang.Number>
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.VarPAggregator<V>
-
- org.apache.derby.impl.sql.execute.VarSAggregator<V>
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,Aggregator<V,java.lang.Double,VarPAggregator<V>>
- Direct Known Subclasses:
StdDevSAggregator
public class VarSAggregator<V extends java.lang.Number> extends VarPAggregator<V>
This class implements the SQL Standard VAR_SAMP() aggregator, computing the variance over a sample. It uses the IBM formula described here:
[ sum(xi2) - sum(xi)2/n ]/(n-1) where n is the number of items in the population x1 ... xn are the items in the population
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.derby.impl.sql.execute.VarPAggregator
VarPAggregator.Sums
-
-
Field Summary
Fields Modifier and Type Field Description private static long
serialVersionUID
-
Fields inherited from class org.apache.derby.impl.sql.execute.VarPAggregator
count, sums
-
-
Constructor Summary
Constructors Constructor Description VarSAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Double
computeVar()
-
Methods inherited from class org.apache.derby.impl.sql.execute.VarPAggregator
accumulate, init, merge, readExternal, terminate, writeExternal
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
computeVar
protected java.lang.Double computeVar()
- Overrides:
computeVar
in classVarPAggregator<V extends java.lang.Number>
-
-