Class IntersectFOQueryConjunctionEvaluator
java.lang.Object
fr.inria.rules.integraal.query_evaluation.conjunction.IntersectFOQueryConjunctionEvaluator
- All Implemented Interfaces:
FOQueryEvaluator<FOFormulaConjunction, QueryableData>, QueryEvaluator<FOQuery<? extends FOFormulaConjunction>, QueryableData>
public class IntersectFOQueryConjunctionEvaluator
extends Object
implements FOQueryEvaluator<FOFormulaConjunction, QueryableData>
Evaluates a conjunction by using intersection to aggregate the
result of each sub-query
The intersection of two substitutions is a substitution from the variables of the two substitutions An intersection is considered correct if for each variable that appear in both substitutions, the associated terms are equals
The intersection of two substitutions is a substitution from the variables of the two substitutions An intersection is considered correct if for each variable that appear in both substitutions, the associated terms are equals
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new evaluator using the given evaluator to evaluate sub-queries -
Method Summary
Modifier and TypeMethodDescriptionevaluate(FOQuery<? extends FOFormulaConjunction> query, QueryableData queryableData, Collection<Variable> vars, Substitution preHomomorphism) //////////////////////////////////////////////Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FOQueryEvaluator
prepareQuery, prepareQueryMethods inherited from interface QueryEvaluator
countAnswers, countHomomorphism, evaluate, evaluate, existAnswer, existAnswer, existHomomorphism, existHomomorphism, homomorphism, homomorphism, postprocessResult, postprocessResult
-
Constructor Details
-
IntersectFOQueryConjunctionEvaluator
Creates a new evaluator using the given evaluator to evaluate sub-queries- Parameters:
evaluator- to evaluate sub-queries
-
-
Method Details
-
evaluate
public Stream<Substitution> evaluate(FOQuery<? extends FOFormulaConjunction> query, QueryableData queryableData, Collection<Variable> vars, Substitution preHomomorphism) throws EvaluationException //////////////////////////////////////////////- Specified by:
evaluatein interfaceFOQueryEvaluator<FOFormulaConjunction, QueryableData>- Specified by:
evaluatein interfaceQueryEvaluator<FOQuery<? extends FOFormulaConjunction>, QueryableData>- Parameters:
query- the query to evaluatequeryableData- the data source against which the query is evaluatedvars- variables constrained to constant answerspreHomomorphism- a partial substitution to extend- Returns:
- a stream of substitutions answering the query
- Throws:
EvaluationException- if the evaluation cannot be completed
-