- java.lang.Object
-
- org.logicng.formulas.Formula
-
- org.logicng.formulas.Constant
-
- org.logicng.formulas.CFalse
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)booleanevaluate(Assignment assignment)Evaluates this formula with a given assignment.inthashCode()Constantnegate()Returns a negated copy of this formula.-
Methods inherited from class org.logicng.formulas.Constant
containsNode, containsVariable, isAtomicFormula, isConstantFormula, iterator, numberOfOperands, restrict, stream, substitute
-
Methods inherited from class org.logicng.formulas.Formula
apply, apply, bdd, bdd, clearCaches, cnf, containsVariable, factory, functionCacheEntry, holds, holds, implies, isCNF, isContradiction, isDNF, isEquivalentTo, isImpliedBy, isNNF, isSatisfiable, isTautology, literals, nnf, numberOfAtoms, numberOfInternalNodes, numberOfNodes, predicateCacheEntry, setFunctionCacheEntry, setPredicateCacheEntry, setPredicateCacheEntry, setTransformationCacheEntry, substitute, toString, transform, transform, transformationCacheEntry, type, variables
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
evaluate
public boolean evaluate(Assignment assignment)
Description copied from class:FormulaEvaluates this formula with a given assignment. A literal not covered by the assignment evaluates tofalseif it is positive, otherwise it evaluates totrue.
-
negate
public Constant negate()
Description copied from class:FormulaReturns a negated copy of this formula.
-
-