Class SimpleDynamicScheduler<QD extends QueryableData>
java.lang.Object
fr.inria.rules.integraal.query_evaluation.conjunction.backtrack.SimpleDynamicScheduler<QD>
- Type Parameters:
QD- the queryable data type handled by the scheduler
- All Implemented Interfaces:
Scheduler<QD>
public class SimpleDynamicScheduler<QD extends QueryableData>
extends Object
implements Scheduler<QD>
Scheduler that orders prepared subqueries dynamically using their estimated bound.
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleDynamicScheduler(List<PreparedFOQuery<? extends FOFormula, QD>> preparedFOQueries) Creates a scheduler from the supplied prepared subqueries. -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()Returns an independent copy of this scheduler.booleanhasNext(int level) Indicates whether another query remains to evaluate at the supplied level.PreparedFOQuery<? extends FOFormula, QD> next(int level, Substitution currentSolution) Returns the next prepared query to evaluate at the supplied level.
-
Constructor Details
-
SimpleDynamicScheduler
Creates a scheduler from the supplied prepared subqueries.- Parameters:
preparedFOQueries- the prepared subqueries to order dynamically
-
-
Method Details
-
next
public PreparedFOQuery<? extends FOFormula, QD> next(int level, Substitution currentSolution) throws EvaluationException Description copied from interface:SchedulerReturns the next prepared query to evaluate at the supplied level.- Specified by:
nextin interfaceScheduler<QD extends QueryableData>- Parameters:
level- the current levelcurrentSolution- the current solution- Returns:
- the next element to evaluate at the given level
- Throws:
EvaluationException- if the scheduler cannot prepare the next query
-
hasNext
public boolean hasNext(int level) Description copied from interface:SchedulerIndicates whether another query remains to evaluate at the supplied level.- Specified by:
hasNextin interfaceScheduler<QD extends QueryableData>- Parameters:
level- the current level- Returns:
- true iff there is a next element to evaluate at the given level
-
deepCopy
Description copied from interface:SchedulerReturns an independent copy of this scheduler.- Specified by:
deepCopyin interfaceScheduler<QD extends QueryableData>- Returns:
- an independent copy of this Scheduler so that another branch can evolve in parallel without interference.
-