![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Definition at line 9 of file IntegerVariableProtoOrBuilder.java.
Public Member Functions | |
| java.lang.String | getName () |
| com.google.protobuf.ByteString | getNameBytes () |
| java.util.List< java.lang.Long > | getDomainList () |
| int | getDomainCount () |
| long | getDomain (int index) |
| long com.google.ortools.sat.IntegerVariableProtoOrBuilder.getDomain | ( | int | index | ) |
The variable domain given as a sorted list of n disjoint intervals
[min, max] and encoded as [min_0, max_0, ..., min_{n-1}, max_{n-1}].
The most common example being just [min, max].
If min == max, then this is a constant variable.
We have:
- domain_size() is always even.
- min == domain.front();
- max == domain.back();
- for all i < n : min_i <= max_i
- for all i < n-1 : max_i + 1 < min_{i+1}.
Note that we check at validation that a variable domain is small enough so
that we don't run into integer overflow in our algorithms. Because of that,
you cannot just have "unbounded" variable like [0, kint64max] and should
try to specify tighter domains.
repeated int64 domain = 2;
| index | The index of the element to return. |
Implemented in com.google.ortools.sat.IntegerVariableProto.Builder, and com.google.ortools.sat.IntegerVariableProto.
| int com.google.ortools.sat.IntegerVariableProtoOrBuilder.getDomainCount | ( | ) |
The variable domain given as a sorted list of n disjoint intervals
[min, max] and encoded as [min_0, max_0, ..., min_{n-1}, max_{n-1}].
The most common example being just [min, max].
If min == max, then this is a constant variable.
We have:
- domain_size() is always even.
- min == domain.front();
- max == domain.back();
- for all i < n : min_i <= max_i
- for all i < n-1 : max_i + 1 < min_{i+1}.
Note that we check at validation that a variable domain is small enough so
that we don't run into integer overflow in our algorithms. Because of that,
you cannot just have "unbounded" variable like [0, kint64max] and should
try to specify tighter domains.
repeated int64 domain = 2;
Implemented in com.google.ortools.sat.IntegerVariableProto.Builder, and com.google.ortools.sat.IntegerVariableProto.
| java.util.List< java.lang.Long > com.google.ortools.sat.IntegerVariableProtoOrBuilder.getDomainList | ( | ) |
The variable domain given as a sorted list of n disjoint intervals
[min, max] and encoded as [min_0, max_0, ..., min_{n-1}, max_{n-1}].
The most common example being just [min, max].
If min == max, then this is a constant variable.
We have:
- domain_size() is always even.
- min == domain.front();
- max == domain.back();
- for all i < n : min_i <= max_i
- for all i < n-1 : max_i + 1 < min_{i+1}.
Note that we check at validation that a variable domain is small enough so
that we don't run into integer overflow in our algorithms. Because of that,
you cannot just have "unbounded" variable like [0, kint64max] and should
try to specify tighter domains.
repeated int64 domain = 2;
Implemented in com.google.ortools.sat.IntegerVariableProto.Builder, and com.google.ortools.sat.IntegerVariableProto.
| java.lang.String com.google.ortools.sat.IntegerVariableProtoOrBuilder.getName | ( | ) |
For debug/logging only. Can be empty.
string name = 1;
Implemented in com.google.ortools.sat.IntegerVariableProto.Builder, and com.google.ortools.sat.IntegerVariableProto.
| com.google.protobuf.ByteString com.google.ortools.sat.IntegerVariableProtoOrBuilder.getNameBytes | ( | ) |
For debug/logging only. Can be empty.
string name = 1;
Implemented in com.google.ortools.sat.IntegerVariableProto.Builder, and com.google.ortools.sat.IntegerVariableProto.