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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classResolve.ClpResolvePredicate
-
Constructor Summary
Constructors Constructor Description Resolve()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.projog.clp.BruteForceSearchcreateBruteForceSearch(org.projog.clp.ClpConstraintStore.Builder builder, java.util.Map<ClpVariable,org.projog.clp.Variable> variables)private java.util.Set<ClpVariable>getAllVariables(Term arg)find all variables in input argument, and all variables connected to them via constraintsprivate java.util.Set<org.projog.clp.Constraint>getConstraints(java.util.Set<ClpVariable> variables)return all constraints of all of the given variablesPredicategetPredicate(Term arg)private java.util.Set<ClpVariable>getVariablesFromInputArgument(Term arg)find all variables in the input argument - input argument could be a single variable or a list of variables-
Methods inherited from class org.projog.core.predicate.AbstractPredicateFactory
getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicate, getPredicate, getPredicate, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBase
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.projog.core.predicate.PredicateFactory
isAlwaysCutOnBacktrack
-
-
-
-
Method Detail
-
getPredicate
public Predicate getPredicate(Term arg)
- Overrides:
getPredicatein classAbstractPredicateFactory
-
getAllVariables
private java.util.Set<ClpVariable> getAllVariables(Term arg)
find all variables in input argument, and all variables connected to them via constraints
-
getVariablesFromInputArgument
private java.util.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 java.util.Set<org.projog.clp.Constraint> getConstraints(java.util.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, java.util.Map<ClpVariable,org.projog.clp.Variable> variables)
-
-