Class Resolve

java.lang.Object
org.projog.core.predicate.AbstractPredicateFactory
org.projog.core.predicate.builtin.clp.Resolve
All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory

public final class Resolve extends AbstractPredicateFactory
label([X]) - assigns concrete values to the given CLP variables.
  • Constructor Details

    • Resolve

      public Resolve()
  • Method Details

    • getPredicate

      public Predicate getPredicate(Term arg)
      Overrides:
      getPredicate in class AbstractPredicateFactory
    • getAllVariables

      private Set<ClpVariable> getAllVariables(Term arg)
      find all variables in input argument, and all variables connected to them via constraints
    • getVariablesFromInputArgument

      private Set<ClpVariable> getVariablesFromInputArgument(Term arg)
      find all variables in the input argument - input argument could be a single variable or a list of variables
    • getConstraints

      private Set<org.projog.clp.Constraint> getConstraints(Set<ClpVariable> variables)
      return all constraints of all of the given variables
    • createBruteForceSearch

      private org.projog.clp.BruteForceSearch createBruteForceSearch(org.projog.clp.ClpConstraintStore.Builder builder, Map<ClpVariable, org.projog.clp.Variable> variables)