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 Details

    • SimpleDynamicScheduler

      public SimpleDynamicScheduler(List<PreparedFOQuery<? extends FOFormula, QD>> preparedFOQueries)
      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: Scheduler
      Returns the next prepared query to evaluate at the supplied level.
      Specified by:
      next in interface Scheduler<QD extends QueryableData>
      Parameters:
      level - the current level
      currentSolution - 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: Scheduler
      Indicates whether another query remains to evaluate at the supplied level.
      Specified by:
      hasNext in interface Scheduler<QD extends QueryableData>
      Parameters:
      level - the current level
      Returns:
      true iff there is a next element to evaluate at the given level
    • deepCopy

      public Scheduler<QD> deepCopy()
      Description copied from interface: Scheduler
      Returns an independent copy of this scheduler.
      Specified by:
      deepCopy in interface Scheduler<QD extends QueryableData>
      Returns:
      an independent copy of this Scheduler so that another branch can evolve in parallel without interference.