- java.lang.Object
-
- org.logicng.predicates.ContainsPBCPredicate
-
- All Implemented Interfaces:
FormulaPredicate
public final class ContainsPBCPredicate extends Object implements FormulaPredicate
Predicate to test if a formula contains any subformula that is a pseudo-Boolean constraint.- Since:
- 2.0.0
- Version:
- 2.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContainsPBCPredicateget()Returns the singleton of the predicate.booleantest(Formula formula, boolean cache)Tests the predicate on a given formula.StringtoString()
-
-
-
Method Detail
-
get
public static ContainsPBCPredicate get()
Returns the singleton of the predicate.- Returns:
- the 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
-
-