Class StatisticCollector
- java.lang.Object
-
- org.eclipse.rdf4j.query.algebra.evaluation.function.aggregate.StatisticCollector
-
- All Implemented Interfaces:
org.eclipse.rdf4j.query.parser.sparql.aggregate.AggregateCollector
- Direct Known Subclasses:
StandardDeviationCollector,VarianceCollector
@Experimental public abstract class StatisticCollector extends Object implements org.eclipse.rdf4j.query.parser.sparql.aggregate.AggregateCollector
AggregateCollectorimplementation that processes SPARQL statistical functions based on inputLiteralvalues.- Author:
- Tomas Kovachev t.kovachev1996@gmail.com
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanpopulationprotected org.apache.commons.math3.stat.descriptive.SummaryStatisticsstatisticsprotected ValueExprEvaluationExceptiontypeErrorprotected static org.eclipse.rdf4j.model.LiteralZERO
-
Constructor Summary
Constructors Constructor Description StatisticCollector(boolean population)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddValue(org.eclipse.rdf4j.model.Literal val)protected abstract org.eclipse.rdf4j.model.LiteralcomputeValue()org.eclipse.rdf4j.model.ValuegetFinalValue()booleanhasError()voidsetTypeError(ValueExprEvaluationException typeError)
-
-
-
Field Detail
-
ZERO
protected static final org.eclipse.rdf4j.model.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 org.eclipse.rdf4j.model.Value getFinalValue() throws ValueExprEvaluationException- Specified by:
getFinalValuein interfaceorg.eclipse.rdf4j.query.parser.sparql.aggregate.AggregateCollector- Throws:
ValueExprEvaluationException
-
setTypeError
public void setTypeError(ValueExprEvaluationException typeError)
-
hasError
public boolean hasError()
-
addValue
public void addValue(org.eclipse.rdf4j.model.Literal val)
-
computeValue
protected abstract org.eclipse.rdf4j.model.Literal computeValue()
-
-