- java.lang.Object
-
- org.logicng.predicates.TermPredicate
-
- All Implemented Interfaces:
FormulaPredicate
public final class TermPredicate extends Object implements FormulaPredicate
Term predicate. Indicates whether a formula is a minterm (conjunction of literals) or maxterm (disjunction of literals).- Since:
- 2.2.0
- Version:
- 2.3.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TermPredicatemaxterm()Returns the singleton maxterm predicate.static TermPredicateminterm()Returns the singleton minterm predicate.booleantest(Formula formula, boolean cache)Tests the predicate on a given formula.StringtoString()
-
-
-
Method Detail
-
minterm
public static TermPredicate minterm()
Returns the singleton minterm predicate.- Returns:
- the minterm predicate instance
-
maxterm
public static TermPredicate maxterm()
Returns the singleton maxterm predicate.- Returns:
- the maxterm predicate instance
-
test
public boolean test(Formula formula, boolean cache)
Description copied from interface:FormulaPredicateTests the predicate on a given formula.- Specified by:
testin interfaceFormulaPredicate- Parameters:
formula- the input formulacache- indicates whether the result should be cached in the formula's cache- Returns:
trueif the formula holds,falseotherwise
-
-