retval[361] = AggregateFunction.AVERAGEA;
retval[362] = MinaMaxa.MAXA;
retval[363] = MinaMaxa.MINA;
- // 364: STDEVPA
- // 365: VARPA
+ retval[364] = AggregateFunction.STDEVPA;
+ retval[365] = AggregateFunction.VARPA;
retval[366] = AggregateFunction.STDEVA;
retval[367] = AggregateFunction.VARA;
return StatsLib.stdev(values);
}
};
+ public static final Function STDEVPA = new AggregateFunction() {
+ @Override
+ protected boolean handleLogicalValues() {
+ return true;
+ }
+
+ @Override
+ protected double evaluate(double[] values) throws EvaluationException {
+ if (values.length < 1) {
+ throw new EvaluationException(ErrorEval.DIV_ZERO);
+ }
+ return StatsLib.stdevp(values);
+ }
+ };
public static final Function SUM = new AggregateFunction() {
protected double evaluate(double[] values) {
return MathX.sum(values);
protected boolean handleLogicalValues() {
return true;
}
-
+
@Override
protected double evaluate(double[] values) throws EvaluationException {
if (values.length < 1) {
return StatsLib.var(values);
}
};
+ public static final Function VARPA = new AggregateFunction() {
+ @Override
+ protected boolean handleLogicalValues() {
+ return true;
+ }
+
+ @Override
+ protected double evaluate(double[] values) throws EvaluationException {
+ if (values.length < 1) {
+ throw new EvaluationException(ErrorEval.DIV_ZERO);
+ }
+ return StatsLib.varp(values);
+ }
+ };
public static final Function GEOMEAN = new Geomean();
private static class Product extends AggregateFunction {