Class StatisticCollector
- java.lang.Object
-
- org.eclipse.rdf4j.query.algebra.evaluation.function.aggregate.StatisticCollector
-
- All Implemented Interfaces:
AggregateCollector
- Direct Known Subclasses:
StandardDeviationCollector
,VarianceCollector
@Experimental public abstract class StatisticCollector extends Object implements AggregateCollector
AggregateCollector
implementation that processes SPARQL statistical functions based on inputLiteral
values.- Author:
- Tomas Kovachev t.kovachev1996@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
population
protected org.apache.commons.math3.stat.descriptive.SummaryStatistics
statistics
protected ValueExprEvaluationException
typeError
protected static Literal
ZERO
-
Constructor Summary
Constructors Constructor Description StatisticCollector(boolean population)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addValue(Literal val)
protected abstract Literal
computeValue()
Value
getFinalValue()
boolean
hasError()
void
setTypeError(ValueExprEvaluationException typeError)
-
-
-
Field Detail
-
ZERO
protected static final Literal ZERO
-
statistics
protected final org.apache.commons.math3.stat.descriptive.SummaryStatistics statistics
-
population
protected final boolean population
-
typeError
protected ValueExprEvaluationException typeError
-
-
Method Detail
-
getFinalValue
public Value getFinalValue() throws ValueExprEvaluationException
- Specified by:
getFinalValue
in interfaceAggregateCollector
- Throws:
ValueExprEvaluationException
-
setTypeError
public void setTypeError(ValueExprEvaluationException typeError)
-
hasError
public boolean hasError()
-
addValue
public void addValue(Literal val)
-
computeValue
protected abstract Literal computeValue()
-
-