Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
com.google.ortools.linearsolver.MPQuadraticObjective.Builder Class Reference
Inheritance diagram for com.google.ortools.linearsolver.MPQuadraticObjective.Builder:
com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
com.google.ortools.linearsolver.MPQuadraticObjective getDefaultInstanceForType ()
 
com.google.ortools.linearsolver.MPQuadraticObjective build ()
 
com.google.ortools.linearsolver.MPQuadraticObjective buildPartial ()
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.linearsolver.MPQuadraticObjective 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 > getQvar1IndexList ()
 
int getQvar1IndexCount ()
 
int getQvar1Index (int index)
 
Builder setQvar1Index (int index, int value)
 
Builder addQvar1Index (int value)
 
Builder addAllQvar1Index (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearQvar1Index ()
 
java.util.List< java.lang.Integer > getQvar2IndexList ()
 
int getQvar2IndexCount ()
 
int getQvar2Index (int index)
 
Builder setQvar2Index (int index, int value)
 
Builder addQvar2Index (int value)
 
Builder addAllQvar2Index (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearQvar2Index ()
 
java.util.List< java.lang.Double > getCoefficientList ()
 
int getCoefficientCount ()
 
double getCoefficient (int index)
 
Builder setCoefficient (int index, double value)
 
Builder addCoefficient (double value)
 
Builder addAllCoefficient (java.lang.Iterable<? extends java.lang.Double > values)
 
Builder clearCoefficient ()
 

Static Public Member Functions

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

Protected Member Functions

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

Detailed Description

Quadratic part of a model's objective. Added with other objectives (such as
linear), this creates the model's objective function to be optimized.
Note: the linear part of the objective currently needs to be specified in the
MPVariableProto.objective_coefficient fields. If you'd rather have a
dedicated linear array here, talk to or-core-team&#64;

Protobuf type operations_research.MPQuadraticObjective

Definition at line 393 of file MPQuadraticObjective.java.

Member Function Documentation

◆ addAllCoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.addAllCoefficient ( java.lang.Iterable<? extends java.lang.Double > values)
Must be finite.

repeated double coefficient = 3;

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

Definition at line 943 of file MPQuadraticObjective.java.

◆ addAllQvar1Index()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.addAllQvar1Index ( java.lang.Iterable<? extends java.lang.Integer > values)
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
`qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable"
field in MPModelProto.
`qvar1_index`, `qvar2_index` and `coefficients` must have the same size.
If the same unordered pair (qvar1_index, qvar2_index) appears several
times, the sum of all of the associated coefficients will be applied.

repeated int32 qvar1_index = 1;

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

Definition at line 735 of file MPQuadraticObjective.java.

◆ addAllQvar2Index()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.addAllQvar2Index ( java.lang.Iterable<? extends java.lang.Integer > values)

repeated int32 qvar2_index = 2;

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

Definition at line 829 of file MPQuadraticObjective.java.

◆ addCoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.addCoefficient ( double value)
Must be finite.

repeated double coefficient = 3;

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

Definition at line 926 of file MPQuadraticObjective.java.

◆ addQvar1Index()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.addQvar1Index ( int value)
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
`qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable"
field in MPModelProto.
`qvar1_index`, `qvar2_index` and `coefficients` must have the same size.
If the same unordered pair (qvar1_index, qvar2_index) appears several
times, the sum of all of the associated coefficients will be applied.

repeated int32 qvar1_index = 1;

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

Definition at line 712 of file MPQuadraticObjective.java.

◆ addQvar2Index()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.addQvar2Index ( int value)

repeated int32 qvar2_index = 2;

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

Definition at line 816 of file MPQuadraticObjective.java.

◆ build()

com.google.ortools.linearsolver.MPQuadraticObjective com.google.ortools.linearsolver.MPQuadraticObjective.Builder.build ( )

Definition at line 442 of file MPQuadraticObjective.java.

◆ buildPartial()

com.google.ortools.linearsolver.MPQuadraticObjective com.google.ortools.linearsolver.MPQuadraticObjective.Builder.buildPartial ( )

Definition at line 451 of file MPQuadraticObjective.java.

◆ clear()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.clear ( )

Definition at line 421 of file MPQuadraticObjective.java.

◆ clearCoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.clearCoefficient ( )
Must be finite.

repeated double coefficient = 3;

Returns
This builder for chaining.

Definition at line 960 of file MPQuadraticObjective.java.

◆ clearQvar1Index()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.clearQvar1Index ( )
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
`qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable"
field in MPModelProto.
`qvar1_index`, `qvar2_index` and `coefficients` must have the same size.
If the same unordered pair (qvar1_index, qvar2_index) appears several
times, the sum of all of the associated coefficients will be applied.

repeated int32 qvar1_index = 1;

Returns
This builder for chaining.

Definition at line 758 of file MPQuadraticObjective.java.

◆ clearQvar2Index()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.clearQvar2Index ( )

repeated int32 qvar2_index = 2;

Returns
This builder for chaining.

Definition at line 842 of file MPQuadraticObjective.java.

◆ getCoefficient()

double com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getCoefficient ( int index)
Must be finite.

repeated double coefficient = 3;

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

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 895 of file MPQuadraticObjective.java.

◆ getCoefficientCount()

int com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getCoefficientCount ( )
Must be finite.

repeated double coefficient = 3;

Returns
The count of coefficient.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 883 of file MPQuadraticObjective.java.

◆ getCoefficientList()

java.util.List< java.lang.Double > com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getCoefficientList ( )
Must be finite.

repeated double coefficient = 3;

Returns
A list containing the coefficient.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 871 of file MPQuadraticObjective.java.

◆ getDefaultInstanceForType()

com.google.ortools.linearsolver.MPQuadraticObjective com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getDefaultInstanceForType ( )

Definition at line 437 of file MPQuadraticObjective.java.

◆ getDescriptor()

static final com.google.protobuf.Descriptors.Descriptor com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getDescriptor ( )
static

Definition at line 398 of file MPQuadraticObjective.java.

◆ getDescriptorForType()

com.google.protobuf.Descriptors.Descriptor com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getDescriptorForType ( )

Definition at line 432 of file MPQuadraticObjective.java.

◆ getQvar1Index()

int com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getQvar1Index ( int index)
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
`qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable"
field in MPModelProto.
`qvar1_index`, `qvar2_index` and `coefficients` must have the same size.
If the same unordered pair (qvar1_index, qvar2_index) appears several
times, the sum of all of the associated coefficients will be applied.

repeated int32 qvar1_index = 1;

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

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 669 of file MPQuadraticObjective.java.

◆ getQvar1IndexCount()

int com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getQvar1IndexCount ( )
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
`qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable"
field in MPModelProto.
`qvar1_index`, `qvar2_index` and `coefficients` must have the same size.
If the same unordered pair (qvar1_index, qvar2_index) appears several
times, the sum of all of the associated coefficients will be applied.

repeated int32 qvar1_index = 1;

Returns
The count of qvar1Index.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 651 of file MPQuadraticObjective.java.

◆ getQvar1IndexList()

java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getQvar1IndexList ( )
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
`qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable"
field in MPModelProto.
`qvar1_index`, `qvar2_index` and `coefficients` must have the same size.
If the same unordered pair (qvar1_index, qvar2_index) appears several
times, the sum of all of the associated coefficients will be applied.

repeated int32 qvar1_index = 1;

Returns
A list containing the qvar1Index.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 633 of file MPQuadraticObjective.java.

◆ getQvar2Index()

int com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getQvar2Index ( int index)

repeated int32 qvar2_index = 2;

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

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 793 of file MPQuadraticObjective.java.

◆ getQvar2IndexCount()

int com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getQvar2IndexCount ( )

repeated int32 qvar2_index = 2;

Returns
The count of qvar2Index.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 785 of file MPQuadraticObjective.java.

◆ getQvar2IndexList()

java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticObjective.Builder.getQvar2IndexList ( )

repeated int32 qvar2_index = 2;

Returns
A list containing the qvar2Index.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 777 of file MPQuadraticObjective.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.ortools.linearsolver.MPQuadraticObjective.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 404 of file MPQuadraticObjective.java.

◆ isInitialized()

final boolean com.google.ortools.linearsolver.MPQuadraticObjective.Builder.isInitialized ( )

Definition at line 525 of file MPQuadraticObjective.java.

◆ mergeFrom() [1/3]

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.mergeFrom ( com.google.ortools.linearsolver.MPQuadraticObjective other)

Definition at line 484 of file MPQuadraticObjective.java.

◆ mergeFrom() [2/3]

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

Definition at line 530 of file MPQuadraticObjective.java.

◆ mergeFrom() [3/3]

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.mergeFrom ( com.google.protobuf.Message other)

Definition at line 475 of file MPQuadraticObjective.java.

◆ setCoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.setCoefficient ( int index,
double value )
Must be finite.

repeated double coefficient = 3;

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

Definition at line 908 of file MPQuadraticObjective.java.

◆ setQvar1Index()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.setQvar1Index ( int index,
int value )
Sparse representation of quadratic terms in the objective function, where
term i is qvar1_index[i] * qvar2_index[i] * coefficient[i].
`qvar1_index` and `qvar2_index` are variable indices w.r.t the "variable"
field in MPModelProto.
`qvar1_index`, `qvar2_index` and `coefficients` must have the same size.
If the same unordered pair (qvar1_index, qvar2_index) appears several
times, the sum of all of the associated coefficients will be applied.

repeated int32 qvar1_index = 1;

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

Definition at line 688 of file MPQuadraticObjective.java.

◆ setQvar2Index()

Builder com.google.ortools.linearsolver.MPQuadraticObjective.Builder.setQvar2Index ( int index,
int value )

repeated int32 qvar2_index = 2;

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

Definition at line 802 of file MPQuadraticObjective.java.


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