Package com.semedy.reasoner.api.builtin
Interface Aggregation
- All Superinterfaces:
Builtin
- All Known Implementing Classes:
AbstractAggregation,CollatingCompose,Compose,Compose,Compose,ContainsSequence2,Count,CountUnique,Max,Mean,Mean,Min,PerformanceTest0.ContainsSequence,Set,Sum,Sum,Sum,Variance
Interface for aggregations.
Aggregations are built-ins which take a set of values
to compute a result. Examples are max, min, mean,....
Aggregations are built-ins which take a set of values
to compute a result. Examples are max, min, mean,....
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaggregation delivers only one result at argument position.voidevaluate(BuiltinReceiver receiver) Evaluate the aggregation.voidinput(long[] input) feed aggregation with input tuplevoidstart feeding the aggregation with input.voidstop()stop feeding the aggregation with inputMethods inherited from interface com.semedy.reasoner.api.builtin.Builtin
clear, cloneBuiltin, evaluationFinished, getArgumentDescriptions, getArity, getDescription, getName, getType, getWeight, init, isEvaluable, isInternal, objectGeneratingArguments, readsSymbolTable, setProperties, setSymbolTable, writesSymbolTable
-
Method Details
-
start
start feeding the aggregation with input. Grounds indicates which arguments are ground- Parameters:
grounds- , which arguments must be instantiated- Throws:
SemReasonerExceptionInterruptedException
-
input
feed aggregation with input tuple- Parameters:
input- , the coded input tuple- Throws:
InterruptedExceptionIOExceptionSemReasonerException
-
stop
stop feeding the aggregation with input -
evaluate
void evaluate(BuiltinReceiver receiver) throws InterruptedException, IOException, SemReasonerException Evaluate the aggregation.
For every result tuple the method "send" in receiver is called- Parameters:
receiver- , the receiver getting the results- Throws:
InterruptedExceptionIOExceptionSemReasonerException
-
deliversOneResultOnly
boolean deliversOneResultOnly()aggregation delivers only one result at argument position.
For instance count delivers one result at argument position 1.- Returns:
- true if it delivers one result only
-