Class SetOf
- java.lang.Object
-
- org.projog.core.predicate.AbstractPredicateFactory
-
- org.projog.core.predicate.builtin.compound.SetOf
-
- All Implemented Interfaces:
KnowledgeBaseConsumer,PredicateFactory,PreprocessablePredicateFactory
public final class SetOf extends AbstractPredicateFactory implements PreprocessablePredicateFactory
setof(X,P,L)- find all solutions that satisfy the goal.setof(X,P,L)produces a list (L) ofXfor each possible solution of the goalP. IfPcontains uninstantiated variables, other thanX, it is possible thatsetofcan be successfully evaluated multiple times - for each possible values of the uninstantiated variables. The elements inLwill appear in sorted order and will not include duplicates. Fails ifPhas no solutions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSetOf.PreprocessedSetOfprivate static classSetOf.SetOfPredicate
-
Constructor Summary
Constructors Constructor Description SetOf()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PredicategetPredicate(Term template, Term goal, Term bag)PredicateFactorypreprocess(Term term)-
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
getPredicate, isAlwaysCutOnBacktrack, isRetryable
-
-
-
-
Method Detail
-
getPredicate
protected Predicate getPredicate(Term template, Term goal, Term bag)
- Overrides:
getPredicatein classAbstractPredicateFactory
-
preprocess
public PredicateFactory preprocess(Term term)
- Specified by:
preprocessin interfacePreprocessablePredicateFactory
-
-