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

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
com.google.ortools.sat.LinearExpressionProto getDefaultInstanceForType ()
 
com.google.ortools.sat.LinearExpressionProto build ()
 
com.google.ortools.sat.LinearExpressionProto buildPartial ()
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.sat.LinearExpressionProto 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 ()
 
long getOffset ()
 
Builder setOffset (long value)
 
Builder clearOffset ()
 
- Public Member Functions inherited from com.google.ortools.sat.LinearExpressionProtoOrBuilder

Static Public Member Functions

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

Protected Member Functions

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

Detailed Description

Some constraints supports linear expression instead of just using a reference
to a variable. This is especially useful during presolve to reduce the model
size.

Protobuf type operations_research.sat.LinearExpressionProto

Definition at line 345 of file LinearExpressionProto.java.

Member Function Documentation

◆ addAllCoeffs()

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

repeated int64 coeffs = 2;

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

Definition at line 690 of file LinearExpressionProto.java.

◆ addAllVars()

Builder com.google.ortools.sat.LinearExpressionProto.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 606 of file LinearExpressionProto.java.

◆ addCoeffs()

Builder com.google.ortools.sat.LinearExpressionProto.Builder.addCoeffs ( long value)

repeated int64 coeffs = 2;

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

Definition at line 677 of file LinearExpressionProto.java.

◆ addVars()

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

repeated int32 vars = 1;

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

Definition at line 593 of file LinearExpressionProto.java.

◆ build()

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

Definition at line 394 of file LinearExpressionProto.java.

◆ buildPartial()

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

Definition at line 403 of file LinearExpressionProto.java.

◆ clear()

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

Definition at line 373 of file LinearExpressionProto.java.

◆ clearCoeffs()

Builder com.google.ortools.sat.LinearExpressionProto.Builder.clearCoeffs ( )

repeated int64 coeffs = 2;

Returns
This builder for chaining.

Definition at line 703 of file LinearExpressionProto.java.

◆ clearOffset()

Builder com.google.ortools.sat.LinearExpressionProto.Builder.clearOffset ( )

int64 offset = 3;

Returns
This builder for chaining.

Definition at line 735 of file LinearExpressionProto.java.

◆ clearVars()

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

repeated int32 vars = 1;

Returns
This builder for chaining.

Definition at line 619 of file LinearExpressionProto.java.

◆ getCoeffs()

long com.google.ortools.sat.LinearExpressionProto.Builder.getCoeffs ( int index)

repeated int64 coeffs = 2;

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

Implements com.google.ortools.sat.LinearExpressionProtoOrBuilder.

Definition at line 654 of file LinearExpressionProto.java.

◆ getCoeffsCount()

int com.google.ortools.sat.LinearExpressionProto.Builder.getCoeffsCount ( )

repeated int64 coeffs = 2;

Returns
The count of coeffs.

Implements com.google.ortools.sat.LinearExpressionProtoOrBuilder.

Definition at line 646 of file LinearExpressionProto.java.

◆ getCoeffsList()

java.util.List< java.lang.Long > com.google.ortools.sat.LinearExpressionProto.Builder.getCoeffsList ( )

repeated int64 coeffs = 2;

Returns
A list containing the coeffs.

Implements com.google.ortools.sat.LinearExpressionProtoOrBuilder.

Definition at line 638 of file LinearExpressionProto.java.

◆ getDefaultInstanceForType()

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

Definition at line 389 of file LinearExpressionProto.java.

◆ getDescriptor()

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

Definition at line 350 of file LinearExpressionProto.java.

◆ getDescriptorForType()

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

Definition at line 384 of file LinearExpressionProto.java.

◆ getOffset()

long com.google.ortools.sat.LinearExpressionProto.Builder.getOffset ( )

int64 offset = 3;

Returns
The offset.

Implements com.google.ortools.sat.LinearExpressionProtoOrBuilder.

Definition at line 716 of file LinearExpressionProto.java.

◆ getVars()

int com.google.ortools.sat.LinearExpressionProto.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.LinearExpressionProtoOrBuilder.

Definition at line 570 of file LinearExpressionProto.java.

◆ getVarsCount()

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

repeated int32 vars = 1;

Returns
The count of vars.

Implements com.google.ortools.sat.LinearExpressionProtoOrBuilder.

Definition at line 562 of file LinearExpressionProto.java.

◆ getVarsList()

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

repeated int32 vars = 1;

Returns
A list containing the vars.

Implements com.google.ortools.sat.LinearExpressionProtoOrBuilder.

Definition at line 554 of file LinearExpressionProto.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 356 of file LinearExpressionProto.java.

◆ isInitialized()

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

Definition at line 468 of file LinearExpressionProto.java.

◆ mergeFrom() [1/3]

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

Definition at line 435 of file LinearExpressionProto.java.

◆ mergeFrom() [2/3]

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

Definition at line 473 of file LinearExpressionProto.java.

◆ mergeFrom() [3/3]

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

Definition at line 426 of file LinearExpressionProto.java.

◆ setCoeffs()

Builder com.google.ortools.sat.LinearExpressionProto.Builder.setCoeffs ( int index,
long value )

repeated int64 coeffs = 2;

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

Definition at line 663 of file LinearExpressionProto.java.

◆ setOffset()

Builder com.google.ortools.sat.LinearExpressionProto.Builder.setOffset ( long value)

int64 offset = 3;

Parameters
valueThe offset to set.
Returns
This builder for chaining.

Definition at line 724 of file LinearExpressionProto.java.

◆ setVars()

Builder com.google.ortools.sat.LinearExpressionProto.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 579 of file LinearExpressionProto.java.


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