Class Dif
- java.lang.Object
-
- org.projog.core.predicate.AbstractSingleResultPredicate
-
- org.projog.core.predicate.builtin.reif.Dif
-
- All Implemented Interfaces:
KnowledgeBaseConsumer,PredicateFactory
public final class Dif extends AbstractSingleResultPredicate
dif(X,Y)- enforces restriction that the two given terms are never equal.If
XandYcannot unify then the goal succeeds. IfXandYare equal then the goal fails. IfXandYcould unify then a restriction is added to preventXandYfrom unifying in the future.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classDif.DifVariableAttributeprivate static classDif.MyMap
-
Field Summary
Fields Modifier and Type Field Description private static Dif.DifVariableAttributeATTRIBUTE_KEY
-
Constructor Summary
Constructors Constructor Description Dif()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidappendAttribute(Variable v, Term attributeElement)private TermcreateTerm(java.util.List<? extends Term> args)booleanevaluate(Term arg1, Term arg2)-
Methods inherited from class org.projog.core.predicate.AbstractSingleResultPredicate
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, 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
-
-
-
-
Field Detail
-
ATTRIBUTE_KEY
private static final Dif.DifVariableAttribute ATTRIBUTE_KEY
-
-