Class SetOf
java.lang.Object
org.projog.core.predicate.AbstractPredicateFactory
org.projog.core.predicate.builtin.compound.SetOf
- All Implemented Interfaces:
KnowledgeBaseConsumer, PredicateFactory, PreprocessablePredicateFactory
setof(X,P,L) - find all solutions that satisfy the goal.
setof(X,P,L) produces a list (L) of X for each possible solution of the goal
P. If P contains uninstantiated variables, other than X, it is possible that
setof can be successfully evaluated multiple times - for each possible values of the uninstantiated
variables. The elements in L will appear in sorted order and will not include duplicates. Fails if
P has no solutions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PredicategetPredicate(Term template, Term goal, Term bag) preprocess(Term term) Methods inherited from class AbstractPredicateFactory
getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicate, getPredicate, getPredicate, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBaseMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PredicateFactory
getPredicate, isAlwaysCutOnBacktrack, isRetryable
-
Constructor Details
-
SetOf
public SetOf()
-
-
Method Details
-
getPredicate
- Overrides:
getPredicatein classAbstractPredicateFactory
-
preprocess
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-