public final class PredSort extends AbstractSingleResultPredicate implements PreprocessablePredicateFactory
predsort(X,Y,Z)
- sorts a list using the specified predicate.
Sorts the list represented by Y
using the predicate represented by X
- and attempts to
unify the result with Z
. The predicate represented by X
must indicate whether the second
argument is equal, less than or greater than the third argument - by unifying the first argument with an atom which
has the value =
, <
or >
.
Constructor and Description |
---|
PredSort() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
evaluate(Term predicateName,
Term input,
Term sorted) |
PredicateFactory |
preprocess(Term term) |
evaluate, evaluate, evaluate, evaluate, evaluate, getArithmeticOperators, getFileHandles, getKnowledgeBase, getOperands, getPredicate, getPredicates, getProjogListeners, getSpyPoints, getTermFormatter, init, isRetryable, setKnowledgeBase
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPredicate, isAlwaysCutOnBacktrack, isRetryable
protected boolean evaluate(Term predicateName, Term input, Term sorted)
evaluate
in class AbstractSingleResultPredicate
public PredicateFactory preprocess(Term term)
preprocess
in interface PreprocessablePredicateFactory
Copyright © 2024. All rights reserved.