Class Distinct

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

public final class Distinct extends AbstractSingleResultPredicate
all_different([X,Y,Z]) - enforce that none of the given CLP variables share the same value.
  • Constructor Details

    • Distinct

      public Distinct()
  • Method Details

    • evaluate

      public boolean evaluate(Term arg)
      Overrides:
      evaluate in class AbstractSingleResultPredicate
    • getOrCreateVariables

      private List<org.projog.clp.Expression> getOrCreateVariables(Term arg)
    • createConstraints

      private List<org.projog.clp.Constraint> createConstraints(List<org.projog.clp.Expression> expressions)