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

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
com.google.ortools.sat.LinearConstraintProto getDefaultInstanceForType ()
 
com.google.ortools.sat.LinearConstraintProto build ()
 
com.google.ortools.sat.LinearConstraintProto buildPartial ()
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.sat.LinearConstraintProto other)
 
final boolean isInitialized ()
 
Builder mergeFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
java.util.List< java.lang.Integer > getVarsList ()
 
int getVarsCount ()
 
int getVars (int index)
 
Builder setVars (int index, int value)
 
Builder addVars (int value)
 
Builder addAllVars (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearVars ()
 
java.util.List< java.lang.Long > getCoeffsList ()
 
int getCoeffsCount ()
 
long getCoeffs (int index)
 
Builder setCoeffs (int index, long value)
 
Builder addCoeffs (long value)
 
Builder addAllCoeffs (java.lang.Iterable<? extends java.lang.Long > values)
 
Builder clearCoeffs ()
 
java.util.List< java.lang.Long > getDomainList ()
 
int getDomainCount ()
 
long getDomain (int index)
 
Builder setDomain (int index, long value)
 
Builder addDomain (long value)
 
Builder addAllDomain (java.lang.Iterable<? extends java.lang.Long > values)
 
Builder clearDomain ()
 
- Public Member Functions inherited from com.google.ortools.sat.LinearConstraintProtoOrBuilder

Static Public Member Functions

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

Protected Member Functions

com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable ()
 

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

Member Function Documentation

◆ addAllCoeffs()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.addAllCoeffs ( java.lang.Iterable<? extends java.lang.Long > values)
Same size as vars.

repeated int64 coeffs = 2;

Parameters
valuesThe coeffs to add.
Returns
This builder for chaining.

Definition at line 787 of file LinearConstraintProto.java.

◆ addAllDomain()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.addAllDomain ( java.lang.Iterable<? extends java.lang.Long > values)

repeated int64 domain = 3;

Parameters
valuesThe domain to add.
Returns
This builder for chaining.

Definition at line 875 of file LinearConstraintProto.java.

◆ addAllVars()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.addAllVars ( java.lang.Iterable<? extends java.lang.Integer > values)

repeated int32 vars = 1;

Parameters
valuesThe vars to add.
Returns
This builder for chaining.

Definition at line 679 of file LinearConstraintProto.java.

◆ addCoeffs()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.addCoeffs ( long value)
Same size as vars.

repeated int64 coeffs = 2;

Parameters
valueThe coeffs to add.
Returns
This builder for chaining.

Definition at line 770 of file LinearConstraintProto.java.

◆ addDomain()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.addDomain ( long value)

repeated int64 domain = 3;

Parameters
valueThe domain to add.
Returns
This builder for chaining.

Definition at line 862 of file LinearConstraintProto.java.

◆ addVars()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.addVars ( int value)

repeated int32 vars = 1;

Parameters
valueThe vars to add.
Returns
This builder for chaining.

Definition at line 666 of file LinearConstraintProto.java.

◆ build()

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

Definition at line 447 of file LinearConstraintProto.java.

◆ buildPartial()

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

Definition at line 456 of file LinearConstraintProto.java.

◆ clear()

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

Definition at line 426 of file LinearConstraintProto.java.

◆ clearCoeffs()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.clearCoeffs ( )
Same size as vars.

repeated int64 coeffs = 2;

Returns
This builder for chaining.

Definition at line 804 of file LinearConstraintProto.java.

◆ clearDomain()

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

repeated int64 domain = 3;

Returns
This builder for chaining.

Definition at line 888 of file LinearConstraintProto.java.

◆ clearVars()

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

repeated int32 vars = 1;

Returns
This builder for chaining.

Definition at line 692 of file LinearConstraintProto.java.

◆ getCoeffs()

long com.google.ortools.sat.LinearConstraintProto.Builder.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 739 of file LinearConstraintProto.java.

◆ getCoeffsCount()

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

repeated int64 coeffs = 2;

Returns
The count of coeffs.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 727 of file LinearConstraintProto.java.

◆ getCoeffsList()

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

repeated int64 coeffs = 2;

Returns
A list containing the coeffs.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 715 of file LinearConstraintProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 442 of file LinearConstraintProto.java.

◆ getDescriptor()

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

Definition at line 403 of file LinearConstraintProto.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor com.google.ortools.sat.LinearConstraintProto.Builder.getDescriptorForType ( )

Definition at line 437 of file LinearConstraintProto.java.

◆ getDomain()

long com.google.ortools.sat.LinearConstraintProto.Builder.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 839 of file LinearConstraintProto.java.

◆ getDomainCount()

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

repeated int64 domain = 3;

Returns
The count of domain.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 831 of file LinearConstraintProto.java.

◆ getDomainList()

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

repeated int64 domain = 3;

Returns
A list containing the domain.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 823 of file LinearConstraintProto.java.

◆ getVars()

int com.google.ortools.sat.LinearConstraintProto.Builder.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 643 of file LinearConstraintProto.java.

◆ getVarsCount()

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

repeated int32 vars = 1;

Returns
The count of vars.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 635 of file LinearConstraintProto.java.

◆ getVarsList()

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

repeated int32 vars = 1;

Returns
A list containing the vars.

Implements com.google.ortools.sat.LinearConstraintProtoOrBuilder.

Definition at line 627 of file LinearConstraintProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 409 of file LinearConstraintProto.java.

◆ isInitialized()

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

Definition at line 530 of file LinearConstraintProto.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.sat.LinearConstraintProto.Builder.mergeFrom ( com.google.ortools.sat.LinearConstraintProto other)

Definition at line 489 of file LinearConstraintProto.java.

◆ mergeFrom() [2/3]

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

Definition at line 535 of file LinearConstraintProto.java.

◆ mergeFrom() [3/3]

Builder com.google.ortools.sat.LinearConstraintProto.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 480 of file LinearConstraintProto.java.

◆ setCoeffs()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.setCoeffs ( int index,
long value )
Same size as vars.

repeated int64 coeffs = 2;

Parameters
indexThe index to set the value at.
valueThe coeffs to set.
Returns
This builder for chaining.

Definition at line 752 of file LinearConstraintProto.java.

◆ setDomain()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.setDomain ( int index,
long value )

repeated int64 domain = 3;

Parameters
indexThe index to set the value at.
valueThe domain to set.
Returns
This builder for chaining.

Definition at line 848 of file LinearConstraintProto.java.

◆ setVars()

Builder com.google.ortools.sat.LinearConstraintProto.Builder.setVars ( int index,
int value )

repeated int32 vars = 1;

Parameters
indexThe index to set the value at.
valueThe vars to set.
Returns
This builder for chaining.

Definition at line 652 of file LinearConstraintProto.java.


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