Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <integer.h>
Public Member Functions | |
IntegerLiteral () | |
Clients should prefer the static construction methods above. | |
IntegerLiteral (IntegerVariable v, IntegerValue b) | |
bool | IsValid () const |
bool | IsAlwaysTrue () const |
bool | IsAlwaysFalse () const |
IntegerLiteral | Negated () const |
The negation of x >= bound is x <= bound - 1. | |
bool | operator== (IntegerLiteral o) const |
bool | operator!= (IntegerLiteral o) const |
std::string | DebugString () const |
Static Public Member Functions | |
static IntegerLiteral | GreaterOrEqual (IntegerVariable i, IntegerValue bound) |
static IntegerLiteral | LowerOrEqual (IntegerVariable i, IntegerValue bound) |
static IntegerLiteral | TrueLiteral () |
static IntegerLiteral | FalseLiteral () |
Public Attributes | |
IntegerVariable | var = kNoIntegerVariable |
IntegerValue | bound = IntegerValue(0) |
The integer equivalent of a literal. It represents an IntegerVariable and an upper/lower bound on it.
Overflow: all the bounds below kMinIntegerValue and kMaxIntegerValue are treated as kMinIntegerValue - 1 and kMaxIntegerValue + 1.
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
Because IntegerLiteral should never be created at a bound less constrained than an existing IntegerVariable bound, we don't allow GreaterOrEqual() to have a bound lower than kMinIntegerValue, and LowerOrEqual() to have a bound greater than kMaxIntegerValue. The other side is not constrained to allow for a computed bound to overflow. Note that both the full initial domain and the empty domain can always be represented.
Implementation.
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
IntegerValue operations_research::sat::IntegerLiteral::bound = IntegerValue(0) |
IntegerVariable operations_research::sat::IntegerLiteral::var = kNoIntegerVariable |