Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <model.h>
Public Member Functions | |
bool | HasOneValue () const |
bool | empty () const |
int64_t | Min () const |
Returns the min of the domain. | |
int64_t | Max () const |
Returns the max of the domain. | |
int64_t | Value () const |
Returns the value of the domain. HasOneValue() must return true. | |
bool | IsAllInt64 () const |
Returns true if the domain is [kint64min..kint64max]. | |
bool | Contains (int64_t value) const |
Various inclusion tests on a domain. | |
bool | OverlapsIntList (const std::vector< int64_t > &vec) const |
bool | OverlapsIntInterval (int64_t lb, int64_t ub) const |
bool | OverlapsDomain (const Domain &other) const |
bool | IntersectWithSingleton (int64_t value) |
bool | IntersectWithDomain (const Domain &domain) |
bool | IntersectWithInterval (int64_t interval_min, int64_t interval_max) |
bool | IntersectWithListOfIntegers (absl::Span< const int64_t > integers) |
bool | IntersectWithFloatDomain (const Domain &domain) |
bool | RemoveValue (int64_t value) |
bool | SetEmptyFloatDomain () |
Sets the empty float domain. Returns true. | |
std::string | DebugString () const |
Static Public Member Functions | |
static Domain | IntegerList (std::vector< int64_t > values) |
The values will be sorted and duplicate values will be removed. | |
static Domain | AllInt64 () |
static Domain | IntegerValue (int64_t value) |
static Domain | Interval (int64_t included_min, int64_t included_max) |
static Domain | Boolean () |
static Domain | SetOfIntegerList (std::vector< int64_t > values) |
static Domain | SetOfAllInt64 () |
static Domain | SetOfIntegerValue (int64_t value) |
static Domain | SetOfInterval (int64_t included_min, int64_t included_max) |
static Domain | SetOfBoolean () |
static Domain | EmptyDomain () |
static Domain | AllFloats () |
static Domain | FloatValue (double value) |
static Domain | FloatInterval (double lb, double ub) |
Public Attributes | |
std::vector< int64_t > | values |
These should never be modified from outside the class. | |
bool | is_interval = false |
bool | display_as_boolean = false |
bool | is_a_set = false |
Indicates if the domain was created as a set domain. | |
bool | is_float = false |
Float domain. | |
std::vector< double > | float_values |
A domain represents the possible values of a variable, and its type (which carries display information, i.e. a Boolean will be displayed differently than an integer with domain {0, 1}). It can be:
|
static |
bool operations_research::fz::Domain::Contains | ( | int64_t | value | ) | const |
std::string operations_research::fz::Domain::DebugString | ( | ) | const |
|
static |
|
static |
|
static |
bool operations_research::fz::Domain::HasOneValue | ( | ) | const |
|
static |
|
static |
bool operations_research::fz::Domain::IntersectWithDomain | ( | const Domain & | domain | ) |
bool operations_research::fz::Domain::IntersectWithFloatDomain | ( | const Domain & | domain | ) |
bool operations_research::fz::Domain::IntersectWithInterval | ( | int64_t | interval_min, |
int64_t | interval_max ) |
bool operations_research::fz::Domain::IntersectWithListOfIntegers | ( | absl::Span< const int64_t > | integers | ) |
bool operations_research::fz::Domain::IntersectWithSingleton | ( | int64_t | value | ) |
|
static |
bool operations_research::fz::Domain::IsAllInt64 | ( | ) | const |
int64_t operations_research::fz::Domain::Max | ( | ) | const |
int64_t operations_research::fz::Domain::Min | ( | ) | const |
bool operations_research::fz::Domain::OverlapsDomain | ( | const Domain & | other | ) | const |
bool operations_research::fz::Domain::OverlapsIntInterval | ( | int64_t | lb, |
int64_t | ub ) const |
bool operations_research::fz::Domain::OverlapsIntList | ( | const std::vector< int64_t > & | vec | ) | const |
bool operations_research::fz::Domain::RemoveValue | ( | int64_t | value | ) |
bool operations_research::fz::Domain::SetEmptyFloatDomain | ( | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
int64_t operations_research::fz::Domain::Value | ( | ) | const |
Returns the value of the domain. HasOneValue() must return true.
bool operations_research::fz::Domain::display_as_boolean = false |
std::vector<double> operations_research::fz::Domain::float_values |
bool operations_research::fz::Domain::is_a_set = false |
bool operations_research::fz::Domain::is_float = false |
std::vector<int64_t> operations_research::fz::Domain::values |