Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.sat.IntegerVariableProto Class Reference
Inheritance diagram for com.google.ortools.sat.IntegerVariableProto:
com.google.ortools.sat.IntegerVariableProtoOrBuilder

Classes

class  Builder
 

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)
 
final boolean isInitialized ()
 
void writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException
 
int getSerializedSize ()
 
boolean equals (final java.lang.Object obj)
 
int hashCode ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
com.google.protobuf.Parser< IntegerVariableProtogetParserForType ()
 
com.google.ortools.sat.IntegerVariableProto getDefaultInstanceForType ()
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.sat.IntegerVariableProto parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.sat.IntegerVariableProto parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException
 
static com.google.ortools.sat.IntegerVariableProto parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static Builder newBuilder ()
 
static Builder newBuilder (com.google.ortools.sat.IntegerVariableProto prototype)
 
static com.google.ortools.sat.IntegerVariableProto getDefaultInstance ()
 
static com.google.protobuf.Parser< IntegerVariableProtoparser ()
 

Static Public Attributes

static final int NAME_FIELD_NUMBER = 1
 
static final int DOMAIN_FIELD_NUMBER = 2
 

Protected Member Functions

java.lang.Object newInstance (UnusedPrivateParameter unused)
 
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ()
 
Builder newBuilderForType (com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
 

Detailed Description

An integer variable.

It will be referred to by an int32 corresponding to its index in a
CpModelProto variables field.

Depending on the context, a reference to a variable whose domain is in [0, 1]
can also be seen as a Boolean that will be true if the variable value is 1
and false if it is 0. When used in this context, the field name will always
contain the word "literal".

Negative reference (advanced usage): to simplify the creation of a model and
for efficiency reasons, all the "literal" or "variable" fields can also
contain a negative index. A negative index i will refer to the negation of
the integer variable at index -i -1 or to NOT the literal at the same index.

Ex: A variable index 4 will refer to the integer variable model.variables(4)
and an index of -5 will refer to the negation of the same variable. A literal
index 4 will refer to the logical fact that model.variable(4) == 1 and a
literal index of -5 will refer to the logical fact model.variable(4) == 0.

Protobuf type operations_research.sat.IntegerVariableProto

Definition at line 32 of file IntegerVariableProto.java.

Member Function Documentation

◆ equals()

boolean com.google.ortools.sat.IntegerVariableProto.equals ( final java.lang.Object obj)

Definition at line 260 of file IntegerVariableProto.java.

◆ getDefaultInstance()

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.getDefaultInstance ( )
static

Definition at line 948 of file IntegerVariableProto.java.

◆ getDefaultInstanceForType()

com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.getDefaultInstanceForType ( )

Definition at line 984 of file IntegerVariableProto.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.IntegerVariableProto.getDescriptor ( )
static

Definition at line 54 of file IntegerVariableProto.java.

◆ getDomain()

long com.google.ortools.sat.IntegerVariableProto.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;

Parameters
indexThe index of the element to return.
Returns
The domain at the given index.

Implements com.google.ortools.sat.IntegerVariableProtoOrBuilder.

Definition at line 198 of file IntegerVariableProto.java.

◆ getDomainCount()

int com.google.ortools.sat.IntegerVariableProto.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;

Returns
The count of domain.

Implements com.google.ortools.sat.IntegerVariableProtoOrBuilder.

Definition at line 170 of file IntegerVariableProto.java.

◆ getDomainList()

java.util.List< java.lang.Long > com.google.ortools.sat.IntegerVariableProto.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;

Returns
A list containing the domain.

Implements com.google.ortools.sat.IntegerVariableProtoOrBuilder.

Definition at line 143 of file IntegerVariableProto.java.

◆ getName()

java.lang.String com.google.ortools.sat.IntegerVariableProto.getName ( )
For debug/logging only. Can be empty.

string name = 1;

Returns
The name.

Implements com.google.ortools.sat.IntegerVariableProtoOrBuilder.

Definition at line 78 of file IntegerVariableProto.java.

◆ getNameBytes()

com.google.protobuf.ByteString com.google.ortools.sat.IntegerVariableProto.getNameBytes ( )
For debug/logging only. Can be empty.

string name = 1;

Returns
The bytes for name.

Implements com.google.ortools.sat.IntegerVariableProtoOrBuilder.

Definition at line 100 of file IntegerVariableProto.java.

◆ getParserForType()

com.google.protobuf.Parser< IntegerVariableProto > com.google.ortools.sat.IntegerVariableProto.getParserForType ( )

Definition at line 979 of file IntegerVariableProto.java.

◆ getSerializedSize()

int com.google.ortools.sat.IntegerVariableProto.getSerializedSize ( )

Definition at line 232 of file IntegerVariableProto.java.

◆ hashCode()

int com.google.ortools.sat.IntegerVariableProto.hashCode ( )

Definition at line 278 of file IntegerVariableProto.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable com.google.ortools.sat.IntegerVariableProto.internalGetFieldAccessorTable ( )
protected

Definition at line 60 of file IntegerVariableProto.java.

◆ isInitialized()

final boolean com.google.ortools.sat.IntegerVariableProto.isInitialized ( )

Definition at line 205 of file IntegerVariableProto.java.

◆ newBuilder() [1/2]

static Builder com.google.ortools.sat.IntegerVariableProto.newBuilder ( )
static

Definition at line 369 of file IntegerVariableProto.java.

◆ newBuilder() [2/2]

static Builder com.google.ortools.sat.IntegerVariableProto.newBuilder ( com.google.ortools.sat.IntegerVariableProto prototype)
static

Definition at line 372 of file IntegerVariableProto.java.

◆ newBuilderForType() [1/2]

Builder com.google.ortools.sat.IntegerVariableProto.newBuilderForType ( )

Definition at line 368 of file IntegerVariableProto.java.

◆ newBuilderForType() [2/2]

Builder com.google.ortools.sat.IntegerVariableProto.newBuilderForType ( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected

Definition at line 382 of file IntegerVariableProto.java.

◆ newInstance()

java.lang.Object com.google.ortools.sat.IntegerVariableProto.newInstance ( UnusedPrivateParameter unused)
protected

Definition at line 48 of file IntegerVariableProto.java.

◆ parseDelimitedFrom() [1/2]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseDelimitedFrom ( java.io.InputStream input) throws java.io.IOException
static

Definition at line 340 of file IntegerVariableProto.java.

◆ parseDelimitedFrom() [2/2]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseDelimitedFrom ( java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 346 of file IntegerVariableProto.java.

◆ parseFrom() [1/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 317 of file IntegerVariableProto.java.

◆ parseFrom() [2/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 321 of file IntegerVariableProto.java.

◆ parseFrom() [3/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 306 of file IntegerVariableProto.java.

◆ parseFrom() [4/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 311 of file IntegerVariableProto.java.

◆ parseFrom() [5/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( com.google.protobuf.CodedInputStream input) throws java.io.IOException
static

Definition at line 353 of file IntegerVariableProto.java.

◆ parseFrom() [6/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 359 of file IntegerVariableProto.java.

◆ parseFrom() [7/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( java.io.InputStream input) throws java.io.IOException
static

Definition at line 327 of file IntegerVariableProto.java.

◆ parseFrom() [8/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws java.io.IOException
static

Definition at line 332 of file IntegerVariableProto.java.

◆ parseFrom() [9/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 295 of file IntegerVariableProto.java.

◆ parseFrom() [10/10]

static com.google.ortools.sat.IntegerVariableProto com.google.ortools.sat.IntegerVariableProto.parseFrom ( java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry ) throws com.google.protobuf.InvalidProtocolBufferException
static

Definition at line 300 of file IntegerVariableProto.java.

◆ parser()

static com.google.protobuf.Parser< IntegerVariableProto > com.google.ortools.sat.IntegerVariableProto.parser ( )
static

Definition at line 974 of file IntegerVariableProto.java.

◆ toBuilder()

Builder com.google.ortools.sat.IntegerVariableProto.toBuilder ( )

Definition at line 376 of file IntegerVariableProto.java.

◆ writeTo()

void com.google.ortools.sat.IntegerVariableProto.writeTo ( com.google.protobuf.CodedOutputStream output) throws java.io.IOException

Definition at line 215 of file IntegerVariableProto.java.

Member Data Documentation

◆ DOMAIN_FIELD_NUMBER

final int com.google.ortools.sat.IntegerVariableProto.DOMAIN_FIELD_NUMBER = 2
static

Definition at line 113 of file IntegerVariableProto.java.

◆ NAME_FIELD_NUMBER

final int com.google.ortools.sat.IntegerVariableProto.NAME_FIELD_NUMBER = 1
static

Definition at line 66 of file IntegerVariableProto.java.


The documentation for this class was generated from the following file: