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 TypeMethodDescriptionboolean
aggregation delivers only one result at argument position.void
evaluate
(BuiltinReceiver receiver) Evaluate the aggregation.void
input
(long[] input) feed aggregation with input tuplevoid
start feeding the aggregation with input.void
stop()
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:
SemReasonerException
InterruptedException
-
input
feed aggregation with input tuple- Parameters:
input
- , the coded input tuple- Throws:
InterruptedException
IOException
SemReasonerException
-
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:
InterruptedException
IOException
SemReasonerException
-
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
-