SemOpt
0.2alpha2-SCC
|
Class encompassing a list of SAT variables (type Variable
) linked by or operators.
More...
Public Member Functions | |
OrClause () | |
Simple constructor. | |
OrClause (int,...) | |
Constructor that can receive as input a list of variables. | |
void | appendVariable (Variable) |
Method for adding a variable at the end of the clause. | |
void | addHeadVariable (Variable) |
Method for adding a variable at the beginning of the clause. | |
void | toSS (stringstream *) const |
Method for returning a string representation of the Or clause in a stringstream object. | |
void | clone (OrClause *) |
Method for cloning this OrClause into a new OrClause that is passed as input output parameter. |
Class encompassing a list of SAT variables (type Variable
) linked by or operators.
For example, the or clause "var1 OR var2 OR var3 OR not var 4 OR var 5" can be defined as OrClause(5, var1, var2, var3, not var4, var5)
Definition at line 11 of file OrClause.h.
OrClause::OrClause | ( | ) |
Simple constructor.
No parameters required, it initializes the data structure but it adds no variables to the clause
Definition at line 18 of file OrClause.cpp.
Referenced by clone().
OrClause::OrClause | ( | int | count, |
... | |||
) |
Constructor that can receive as input a list of variables.
[in] | count | The number of variables that follows |
[in] | .... | The list of variables that follows, instances of type Variable |
For instance, OrClause(3, var1, var2, var3)
Definition at line 29 of file OrClause.cpp.
void OrClause::addHeadVariable | ( | Variable | x | ) |
Method for adding a variable at the beginning of the clause.
[in] | x | The variable to add (of type Variable ) |
void |
Definition at line 56 of file OrClause.cpp.
void OrClause::appendVariable | ( | Variable | x | ) |
Method for adding a variable at the end of the clause.
[in] | x | The variable to add |
void |
Definition at line 46 of file OrClause.cpp.
void OrClause::clone | ( | OrClause * | newclause | ) |
Method for cloning this OrClause into a new OrClause that is passed as input output parameter.
[in,out] | newclause | Pointer to another OrClause object, which is newly initialised, and then which will become a clone (not a pointer) of this object |
void |
Definition at line 87 of file OrClause.cpp.
References OrClause().
void OrClause::toSS | ( | stringstream * | ss | ) | const |
Method for returning a string representation of the Or clause in a stringstream
object.
[in,out] | ss | A pointer to an already initialised stringstream object which will contain the string representation of this object |
void |
Definition at line 68 of file OrClause.cpp.