Package owl.logic.propositional
Class PropositionalFormula.Disjunction<T>
- java.lang.Object
-
- owl.logic.propositional.PropositionalFormula<T>
-
- owl.logic.propositional.PropositionalFormula.Disjunction<T>
-
- Enclosing class:
- PropositionalFormula<T>
public static final class PropositionalFormula.Disjunction<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 List<PropositionalFormula<T>>
disjuncts
-
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(List<? extends PropositionalFormula<T>> disjuncts)
static <T> PropositionalFormula<T>
of(PropositionalFormula<T>... operands)
static <T> PropositionalFormula<T>
of(T... operands)
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
-
disjuncts
public final List<PropositionalFormula<T>> disjuncts
-
-
Method Detail
-
of
@SafeVarargs public static <T> PropositionalFormula<T> of(T... operands)
-
of
@SafeVarargs public static <T> PropositionalFormula<T> of(PropositionalFormula<T>... operands)
-
of
public static <T> PropositionalFormula<T> of(List<? extends PropositionalFormula<T>> disjuncts)
-
evaluate
public boolean evaluate(Set<? extends T> assignment)
- Specified by:
evaluate
in classPropositionalFormula<T>
-
nnf
protected PropositionalFormula<T> nnf(boolean negated)
- Specified by:
nnf
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.
-
-