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

Classes

class  Builder
 

Public Member Functions

java.util.List< java.lang.Integer > getVarsList ()
 
int getVarsCount ()
 
int getVars (int index)
 
java.util.List< java.lang.Long > getCoeffsList ()
 
int getCoeffsCount ()
 
long getCoeffs (int index)
 
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< LinearConstraintProtogetParserForType ()
 
com.google.ortools.sat.LinearConstraintProto getDefaultInstanceForType ()
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.sat.LinearConstraintProto parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.sat.LinearConstraintProto parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.sat.LinearConstraintProto parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException
 
static com.google.ortools.sat.LinearConstraintProto 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.LinearConstraintProto prototype)
 
static com.google.ortools.sat.LinearConstraintProto getDefaultInstance ()
 
static com.google.protobuf.Parser< LinearConstraintProtoparser ()
 

Static Public Attributes

static final int VARS_FIELD_NUMBER = 1
 
static final int COEFFS_FIELD_NUMBER = 2
 
static final int DOMAIN_FIELD_NUMBER = 3
 

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

The linear sum vars[i] * coeffs[i] must fall in the given domain. The domain
has the same format as the one in IntegerVariableProto.

Note that the validation code currently checks using the domain of the
involved variables that the sum can always be computed without integer
overflow and throws an error otherwise.

Protobuf type operations_research.sat.LinearConstraintProto

Definition at line 19 of file LinearConstraintProto.java.

Member Function Documentation

◆ equals()

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

Definition at line 249 of file LinearConstraintProto.java.

◆ getCoeffs()

long com.google.ortools.sat.LinearConstraintProto.getCoeffs ( int index)
Same size as vars.

repeated int64 coeffs = 2;

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

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 121 of file LinearConstraintProto.java.

◆ getCoeffsCount()

int com.google.ortools.sat.LinearConstraintProto.getCoeffsCount ( )
Same size as vars.

repeated int64 coeffs = 2;

Returns
The count of coeffs.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 109 of file LinearConstraintProto.java.

◆ getCoeffsList()

java.util.List< java.lang.Long > com.google.ortools.sat.LinearConstraintProto.getCoeffsList ( )
Same size as vars.

repeated int64 coeffs = 2;

Returns
A list containing the coeffs.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 98 of file LinearConstraintProto.java.

◆ getDefaultInstance()

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

Definition at line 946 of file LinearConstraintProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 982 of file LinearConstraintProto.java.

◆ getDescriptor()

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

Definition at line 42 of file LinearConstraintProto.java.

◆ getDomain()

long com.google.ortools.sat.LinearConstraintProto.getDomain ( int index)

repeated int64 domain = 3;

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

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 151 of file LinearConstraintProto.java.

◆ getDomainCount()

int com.google.ortools.sat.LinearConstraintProto.getDomainCount ( )

repeated int64 domain = 3;

Returns
The count of domain.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 143 of file LinearConstraintProto.java.

◆ getDomainList()

java.util.List< java.lang.Long > com.google.ortools.sat.LinearConstraintProto.getDomainList ( )

repeated int64 domain = 3;

Returns
A list containing the domain.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 136 of file LinearConstraintProto.java.

◆ getParserForType()

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

Definition at line 977 of file LinearConstraintProto.java.

◆ getSerializedSize()

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

Definition at line 196 of file LinearConstraintProto.java.

◆ getVars()

int com.google.ortools.sat.LinearConstraintProto.getVars ( int index)

repeated int32 vars = 1;

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

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 79 of file LinearConstraintProto.java.

◆ getVarsCount()

int com.google.ortools.sat.LinearConstraintProto.getVarsCount ( )

repeated int32 vars = 1;

Returns
The count of vars.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 71 of file LinearConstraintProto.java.

◆ getVarsList()

java.util.List< java.lang.Integer > com.google.ortools.sat.LinearConstraintProto.getVarsList ( )

repeated int32 vars = 1;

Returns
A list containing the vars.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 64 of file LinearConstraintProto.java.

◆ hashCode()

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

Definition at line 269 of file LinearConstraintProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 48 of file LinearConstraintProto.java.

◆ isInitialized()

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

Definition at line 158 of file LinearConstraintProto.java.

◆ newBuilder() [1/2]

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

Definition at line 366 of file LinearConstraintProto.java.

◆ newBuilder() [2/2]

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

Definition at line 369 of file LinearConstraintProto.java.

◆ newBuilderForType() [1/2]

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

Definition at line 365 of file LinearConstraintProto.java.

◆ newBuilderForType() [2/2]

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

Definition at line 379 of file LinearConstraintProto.java.

◆ newInstance()

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

Definition at line 36 of file LinearConstraintProto.java.

◆ parseDelimitedFrom() [1/2]

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

Definition at line 337 of file LinearConstraintProto.java.

◆ parseDelimitedFrom() [2/2]

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

Definition at line 343 of file LinearConstraintProto.java.

◆ parseFrom() [1/10]

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

Definition at line 314 of file LinearConstraintProto.java.

◆ parseFrom() [2/10]

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

Definition at line 318 of file LinearConstraintProto.java.

◆ parseFrom() [3/10]

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

Definition at line 303 of file LinearConstraintProto.java.

◆ parseFrom() [4/10]

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

Definition at line 308 of file LinearConstraintProto.java.

◆ parseFrom() [5/10]

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

Definition at line 350 of file LinearConstraintProto.java.

◆ parseFrom() [6/10]

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

Definition at line 356 of file LinearConstraintProto.java.

◆ parseFrom() [7/10]

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

Definition at line 324 of file LinearConstraintProto.java.

◆ parseFrom() [8/10]

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

Definition at line 329 of file LinearConstraintProto.java.

◆ parseFrom() [9/10]

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

Definition at line 292 of file LinearConstraintProto.java.

◆ parseFrom() [10/10]

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

Definition at line 297 of file LinearConstraintProto.java.

◆ parser()

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

Definition at line 972 of file LinearConstraintProto.java.

◆ toBuilder()

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

Definition at line 373 of file LinearConstraintProto.java.

◆ writeTo()

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

Definition at line 168 of file LinearConstraintProto.java.

Member Data Documentation

◆ COEFFS_FIELD_NUMBER

final int com.google.ortools.sat.LinearConstraintProto.COEFFS_FIELD_NUMBER = 2
static

Definition at line 84 of file LinearConstraintProto.java.

◆ DOMAIN_FIELD_NUMBER

final int com.google.ortools.sat.LinearConstraintProto.DOMAIN_FIELD_NUMBER = 3
static

Definition at line 126 of file LinearConstraintProto.java.

◆ VARS_FIELD_NUMBER

final int com.google.ortools.sat.LinearConstraintProto.VARS_FIELD_NUMBER = 1
static

Definition at line 54 of file LinearConstraintProto.java.


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