Interface Clause
The 
Clause interface represents a logical clause, which is a disjunction (OR) of literals in propositional logic.
 Clauses are fundamental components in SAT solvers and are used to encode constraints and logical formulas.- Author:
- Mathias Hofer
- 
Method SummaryModifier and TypeMethodDescriptionstatic Clauseof()Creates a clause with no literals.static Clauseof(Collection<? extends Literal> literals) Creates a clause from a collection of literals.static Clauseof(Collection<? extends Literal> literals, Literal l) Creates a clause from a collection of literals and an additional literal.static Clauseof(Collection<? extends Literal> literals, Literal l1, Literal l2) Creates a clause from a collection of literals and two additional literals.static ClauseCreates a clause from a collection of literals and three additional literals.static ClauseCreates a clause by extending an existing clause with an additional literal.static ClauseCreates a clause with a single literal.static ClauseCreates a clause with two literals.static ClauseCreates a clause with three literals.intsize()Returns the number of literals in this clause.stream()Returns a stream of literals contained in this clause.Methods inherited from interface java.lang.IterableforEach, iterator, spliterator
- 
Method Details- 
stream
- 
sizeint size()Returns the number of literals in this clause.- Returns:
- the size of the clause
 
- 
ofCreates a clause with no literals. This represents an empty clause.- Returns:
- a clause with no literals
 
- 
of
- 
of
- 
of
- 
of
- 
ofCreates a clause from a collection of literals.- Parameters:
- literals- a collection of literals
- Returns:
- a clause containing the literals from the collection
 
- 
ofCreates a clause from a collection of literals and an additional literal.- Parameters:
- literals- a collection of literals
- l- the additional literal
- Returns:
- a new clause containing the literals from the collection plus the additional literal
 
- 
ofCreates a clause from a collection of literals and two additional literals.- Parameters:
- literals- a collection of literals
- l1- the first additional literal
- l2- the second additional literal
- Returns:
- a new clause containing the literals from the collection plus the additional literals
 
- 
ofCreates a clause from a collection of literals and three additional literals.- Parameters:
- literals- a collection of literals
- l1- the first additional literal
- l2- the second additional literal
- l3- the third additional literal
- Returns:
- a new clause containing the literals from the collection plus the additional literals
 
 
-