![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
Functions | |
bool | is_boolean (Any x) |
int | assert_is_zero_or_one (Any x) |
int | to_capped_int64 (int v) |
int | capped_subtraction (int x, int y) |
Variables | |
int | INT_MIN = -9223372036854775808 |
int | INT_MAX = 9223372036854775807 |
helpers methods for the cp_model module.
int ortools.sat.python.cp_model_numbers.assert_is_zero_or_one | ( | Any | x | ) |
Asserts that x is 0 or 1 and returns it as an int.
Definition at line 34 of file cp_model_numbers.py.
int ortools.sat.python.cp_model_numbers.capped_subtraction | ( | int | x, |
int | y ) |
Saturated arithmetics. Returns x - y truncated to the int64_t range.
Definition at line 53 of file cp_model_numbers.py.
bool ortools.sat.python.cp_model_numbers.is_boolean | ( | Any | x | ) |
Checks if the x is a boolean.
Definition at line 25 of file cp_model_numbers.py.
int ortools.sat.python.cp_model_numbers.to_capped_int64 | ( | int | v | ) |
Restrict v within [INT_MIN..INT_MAX] range.
Definition at line 44 of file cp_model_numbers.py.
int ortools.sat.python.cp_model_numbers.INT_MAX = 9223372036854775807 |
Definition at line 22 of file cp_model_numbers.py.
int ortools.sat.python.cp_model_numbers.INT_MIN = -9223372036854775808 |
Definition at line 21 of file cp_model_numbers.py.