Java Reference

Java Reference

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 17 of file LinearConstraintProto.java.

Classes

class  Builder
 

Public Member Functions

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ()
 
.lang.Override java.util.List< java.lang.Integer > getVarsList ()
 repeated int32 vars = 1; More...
 
int getVarsCount ()
 repeated int32 vars = 1; More...
 
int getVars (int index)
 repeated int32 vars = 1; More...
 
.lang.Override java.util.List< java.lang.Long > getCoeffsList ()
 
int getCoeffsCount ()
 
long getCoeffs (int index)
 
.lang.Override java.util.List< java.lang.Long > getDomainList ()
 repeated int64 domain = 3; More...
 
int getDomainCount ()
 repeated int64 domain = 3; More...
 
long getDomain (int index)
 repeated int64 domain = 3; More...
 
.lang.Override final boolean isInitialized ()
 
.lang.Override void writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException
 
.lang.Override int getSerializedSize ()
 
.lang.Override boolean equals (final java.lang.Object obj)
 
.lang.Override int hashCode ()
 
.lang.Override Builder newBuilderForType ()
 
.lang.Override Builder toBuilder ()
 
.lang.Override com.google.protobuf.Parser< LinearConstraintProtogetParserForType ()
 
.lang.Override 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

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

Member Function Documentation

◆ equals()

.lang.Override boolean equals ( final java.lang.Object  obj)

Definition at line 356 of file LinearConstraintProto.java.

◆ getCoeffs()

long 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 LinearConstraintProtoOrBuilder.

Definition at line 230 of file LinearConstraintProto.java.

◆ getCoeffsCount()

int getCoeffsCount ( )
Same size as vars.

repeated int64 coeffs = 2;

Returns
The count of coeffs.

Implements LinearConstraintProtoOrBuilder.

Definition at line 218 of file LinearConstraintProto.java.

◆ getCoeffsList()

.lang.Override java.util.List<java.lang.Long> getCoeffsList ( )
Same size as vars.

repeated int64 coeffs = 2;

Returns
A list containing the coeffs.

Implements LinearConstraintProtoOrBuilder.

Definition at line 207 of file LinearConstraintProto.java.

◆ getDefaultInstance()

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

Definition at line 977 of file LinearConstraintProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 1002 of file LinearConstraintProto.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ( )
static

Definition at line 155 of file LinearConstraintProto.java.

◆ getDomain()

long getDomain ( int  index)

repeated int64 domain = 3;

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

Implements LinearConstraintProtoOrBuilder.

Definition at line 258 of file LinearConstraintProto.java.

◆ getDomainCount()

int getDomainCount ( )

repeated int64 domain = 3;

Returns
The count of domain.

Implements LinearConstraintProtoOrBuilder.

Definition at line 250 of file LinearConstraintProto.java.

◆ getDomainList()

.lang.Override java.util.List<java.lang.Long> getDomainList ( )

repeated int64 domain = 3;

Returns
A list containing the domain.

Implements LinearConstraintProtoOrBuilder.

Definition at line 243 of file LinearConstraintProto.java.

◆ getParserForType()

.lang.Override com.google.protobuf.Parser<LinearConstraintProto> getParserForType ( )

Definition at line 997 of file LinearConstraintProto.java.

◆ getSerializedSize()

.lang.Override int getSerializedSize ( )

Definition at line 303 of file LinearConstraintProto.java.

◆ getUnknownFields()

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ( )

Definition at line 41 of file LinearConstraintProto.java.

◆ getVars()

int getVars ( int  index)

repeated int32 vars = 1;

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

Implements LinearConstraintProtoOrBuilder.

Definition at line 190 of file LinearConstraintProto.java.

◆ getVarsCount()

int getVarsCount ( )

repeated int32 vars = 1;

Returns
The count of vars.

Implements LinearConstraintProtoOrBuilder.

Definition at line 182 of file LinearConstraintProto.java.

◆ getVarsList()

.lang.Override java.util.List<java.lang.Integer> getVarsList ( )

repeated int32 vars = 1;

Returns
A list containing the vars.

Implements LinearConstraintProtoOrBuilder.

Definition at line 175 of file LinearConstraintProto.java.

◆ hashCode()

.lang.Override int hashCode ( )

Definition at line 376 of file LinearConstraintProto.java.

◆ internalGetFieldAccessorTable()

.lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable ( )
protected

Definition at line 161 of file LinearConstraintProto.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )

Definition at line 265 of file LinearConstraintProto.java.

◆ newBuilder() [1/2]

static Builder newBuilder ( )
static

Definition at line 471 of file LinearConstraintProto.java.

◆ newBuilder() [2/2]

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

Definition at line 474 of file LinearConstraintProto.java.

◆ newBuilderForType() [1/2]

.lang.Override Builder newBuilderForType ( )

Definition at line 470 of file LinearConstraintProto.java.

◆ newBuilderForType() [2/2]

.lang.Override Builder newBuilderForType ( com.google.protobuf.GeneratedMessageV3.BuilderParent  parent)
protected

Definition at line 484 of file LinearConstraintProto.java.

◆ newInstance()

.lang.Override java.lang.Object newInstance ( UnusedPrivateParameter  unused)
protected

Definition at line 34 of file LinearConstraintProto.java.

◆ parseDelimitedFrom() [1/2]

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

Definition at line 443 of file LinearConstraintProto.java.

◆ parseDelimitedFrom() [2/2]

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

Definition at line 448 of file LinearConstraintProto.java.

◆ parseFrom() [1/10]

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

Definition at line 421 of file LinearConstraintProto.java.

◆ parseFrom() [2/10]

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

Definition at line 425 of file LinearConstraintProto.java.

◆ parseFrom() [3/10]

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

Definition at line 410 of file LinearConstraintProto.java.

◆ parseFrom() [4/10]

static 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 415 of file LinearConstraintProto.java.

◆ parseFrom() [5/10]

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

Definition at line 455 of file LinearConstraintProto.java.

◆ parseFrom() [6/10]

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

Definition at line 461 of file LinearConstraintProto.java.

◆ parseFrom() [7/10]

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

Definition at line 431 of file LinearConstraintProto.java.

◆ parseFrom() [8/10]

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

Definition at line 436 of file LinearConstraintProto.java.

◆ parseFrom() [9/10]

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

Definition at line 399 of file LinearConstraintProto.java.

◆ parseFrom() [10/10]

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

Definition at line 404 of file LinearConstraintProto.java.

◆ parser()

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

Definition at line 992 of file LinearConstraintProto.java.

◆ toBuilder()

.lang.Override Builder toBuilder ( )

Definition at line 478 of file LinearConstraintProto.java.

◆ writeTo()

.lang.Override void writeTo ( com.google.protobuf.CodedOutputStream  output) throws java.io.IOException

Definition at line 275 of file LinearConstraintProto.java.

Member Data Documentation

◆ COEFFS_FIELD_NUMBER

final int COEFFS_FIELD_NUMBER = 2
static

Definition at line 195 of file LinearConstraintProto.java.

◆ DOMAIN_FIELD_NUMBER

final int DOMAIN_FIELD_NUMBER = 3
static

Definition at line 235 of file LinearConstraintProto.java.

◆ VARS_FIELD_NUMBER

final int VARS_FIELD_NUMBER = 1
static

Definition at line 167 of file LinearConstraintProto.java.


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