Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <sat_base.h>
Public Member Functions | |
VariablesAssignment ()=default | |
VariablesAssignment (int num_variables) | |
VariablesAssignment (const VariablesAssignment &)=delete | |
This type is neither copyable nor movable. | |
VariablesAssignment & | operator= (const VariablesAssignment &)=delete |
void | Resize (int num_variables) |
void | AssignFromTrueLiteral (Literal literal) |
void | UnassignLiteral (Literal literal) |
bool | LiteralIsFalse (Literal literal) const |
bool | LiteralIsTrue (Literal literal) const |
bool | LiteralIsAssigned (Literal literal) const |
bool | VariableIsAssigned (BooleanVariable var) const |
Returns true iff the given variable is assigned. | |
Literal | GetTrueLiteralForAssignedVariable (BooleanVariable var) const |
int | NumberOfVariables () const |
Friends | |
class | AssignmentView |
Holds the current variable assignment of the solver. Each variable can be unassigned or be assigned to true or false.
Definition at line 156 of file sat_base.h.
|
default |
|
inlineexplicit |
Definition at line 159 of file sat_base.h.
|
delete |
This type is neither copyable nor movable.
|
inline |
Makes the given literal true by assigning its underlying variable to either true or false depending on the literal sign. This can only be called on an unassigned variable.
Definition at line 171 of file sat_base.h.
|
inline |
Returns the literal of the given variable that is assigned to true. That is, depending on the variable, it can be the positive literal or the negative one. Only call this on an assigned variable.
Definition at line 203 of file sat_base.h.
|
inline |
Definition at line 191 of file sat_base.h.
|
inline |
Literal getters. Note that both can be false, in which case the corresponding variable is not assigned.
Definition at line 185 of file sat_base.h.
|
inline |
Definition at line 188 of file sat_base.h.
|
inline |
Definition at line 208 of file sat_base.h.
|
delete |
|
inline |
Definition at line 164 of file sat_base.h.
|
inline |
Unassign the variable corresponding to the given literal. This can only be called on an assigned variable.
Definition at line 178 of file sat_base.h.
|
inline |
Returns true iff the given variable is assigned.
Definition at line 196 of file sat_base.h.
|
friend |
Definition at line 217 of file sat_base.h.