Package owl.logic.propositional
Class PropositionalFormula.Negation<T>
- java.lang.Object
-
- owl.logic.propositional.PropositionalFormula<T>
-
- owl.logic.propositional.PropositionalFormula.Negation<T>
-
- Enclosing class:
- PropositionalFormula<T>
public static final class PropositionalFormula.Negation<T> extends PropositionalFormula<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class owl.logic.propositional.PropositionalFormula
PropositionalFormula.Biconditional<T>, PropositionalFormula.Conjunction<T>, PropositionalFormula.Disjunction<T>, PropositionalFormula.Negation<T>, PropositionalFormula.Polarity, PropositionalFormula.Variable<T>
-
-
Field Summary
Fields Modifier and Type Field Description PropositionalFormula<T>
operand
-
Constructor Summary
Constructors Constructor Description Negation(PropositionalFormula<T> operand)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsVariable(T variable)
protected void
countVariables(Map<T,Integer> occurrences)
boolean
equals(Object obj)
boolean
evaluate(Set<? extends T> assignment)
int
hashCode()
int
height()
<R> PropositionalFormula<R>
map(Function<? super T,R> mapper)
protected PropositionalFormula<T>
nnf(boolean negated)
static <T> PropositionalFormula<T>
of(PropositionalFormula<T> operand)
Map<T,PropositionalFormula.Polarity>
polarity()
Optional<T>
smallestVariable()
Returns the smallest variable using the naturalOrder.<S> PropositionalFormula<S>
substitute(Function<? super T,? extends PropositionalFormula<S>> substitution)
String
toString()
-
Methods inherited from class owl.logic.propositional.PropositionalFormula
conjuncts, conjuncts, constant, countVariables, deduplicate, disjuncts, disjuncts, falseConstant, isFalse, isTrue, nnf, trueConstant, variables
-
-
-
-
Field Detail
-
operand
public final PropositionalFormula<T> operand
-
-
Constructor Detail
-
Negation
public Negation(PropositionalFormula<T> operand)
-
-
Method Detail
-
of
public static <T> PropositionalFormula<T> of(PropositionalFormula<T> operand)
-
nnf
protected PropositionalFormula<T> nnf(boolean negated)
- Specified by:
nnf
in classPropositionalFormula<T>
-
evaluate
public boolean evaluate(Set<? extends T> assignment)
- Specified by:
evaluate
in classPropositionalFormula<T>
-
polarity
public Map<T,PropositionalFormula.Polarity> polarity()
- Specified by:
polarity
in classPropositionalFormula<T>
-
countVariables
protected void countVariables(Map<T,Integer> occurrences)
- Specified by:
countVariables
in classPropositionalFormula<T>
-
map
public <R> PropositionalFormula<R> map(Function<? super T,R> mapper)
- Specified by:
map
in classPropositionalFormula<T>
-
height
public int height()
- Specified by:
height
in classPropositionalFormula<T>
-
substitute
public <S> PropositionalFormula<S> substitute(Function<? super T,? extends PropositionalFormula<S>> substitution)
- Specified by:
substitute
in classPropositionalFormula<T>
-
containsVariable
public boolean containsVariable(T variable)
- Specified by:
containsVariable
in classPropositionalFormula<T>
-
smallestVariable
public Optional<T> smallestVariable()
Description copied from class:PropositionalFormula
Returns the smallest variable using the naturalOrder.- Specified by:
smallestVariable
in classPropositionalFormula<T>
- Returns:
- the smallest variable.
-
-