Java Reference
Java Reference
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@
Protobuf type
Definition at line 496 of file MPQuadraticObjective.java.
Public Member Functions | |
| .lang.Override Builder | clear () |
| .lang.Override com.google.protobuf.Descriptors.Descriptor | getDescriptorForType () |
| .lang.Override com.google.ortools.linearsolver.MPQuadraticObjective | getDefaultInstanceForType () |
| .lang.Override com.google.ortools.linearsolver.MPQuadraticObjective | build () |
| .lang.Override com.google.ortools.linearsolver.MPQuadraticObjective | buildPartial () |
| .lang.Override Builder | clone () |
| .lang.Override Builder | setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
| .lang.Override Builder | clearField (com.google.protobuf.Descriptors.FieldDescriptor field) |
| .lang.Override Builder | clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof) |
| .lang.Override Builder | setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) |
| .lang.Override Builder | addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) |
| .lang.Override Builder | mergeFrom (com.google.protobuf.Message other) |
| Builder | mergeFrom (com.google.ortools.linearsolver.MPQuadraticObjective other) |
| .lang.Override final boolean | isInitialized () |
| .lang.Override 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 () |
repeated int32 qvar2_index = 2; More... | |
| int | getQvar2IndexCount () |
repeated int32 qvar2_index = 2; More... | |
| int | getQvar2Index (int index) |
repeated int32 qvar2_index = 2; More... | |
| Builder | setQvar2Index (int index, int value) |
repeated int32 qvar2_index = 2; More... | |
| Builder | addQvar2Index (int value) |
repeated int32 qvar2_index = 2; More... | |
| Builder | addAllQvar2Index (java.lang.Iterable<? extends java.lang.Integer > values) |
repeated int32 qvar2_index = 2; More... | |
| Builder | clearQvar2Index () |
repeated int32 qvar2_index = 2; More... | |
| 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 () |
| .lang.Override final Builder | setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
| .lang.Override final Builder | mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields) |
Static Public Member Functions | |
| static final com.google.protobuf.Descriptors.Descriptor | getDescriptor () |
Protected Member Functions | |
| .lang.Override com.google.protobuf.GeneratedMessageV3.FieldAccessorTable | internalGetFieldAccessorTable () |
Member Function Documentation
◆ addAllCoefficient()
|
inline |
Must be finite.
repeated double coefficient = 3;
- Parameters
-
values The coefficient to add.
- Returns
- This builder for chaining.
Definition at line 999 of file MPQuadraticObjective.java.
◆ addAllQvar1Index()
|
inline |
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
-
values The qvar1Index to add.
- Returns
- This builder for chaining.
Definition at line 807 of file MPQuadraticObjective.java.
◆ addAllQvar2Index()
|
inline |
repeated int32 qvar2_index = 2;
- Parameters
-
values The qvar2Index to add.
- Returns
- This builder for chaining.
Definition at line 896 of file MPQuadraticObjective.java.
◆ addCoefficient()
|
inline |
Must be finite.
repeated double coefficient = 3;
- Parameters
-
value The coefficient to add.
- Returns
- This builder for chaining.
Definition at line 984 of file MPQuadraticObjective.java.
◆ addQvar1Index()
|
inline |
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
-
value The qvar1Index to add.
- Returns
- This builder for chaining.
Definition at line 786 of file MPQuadraticObjective.java.
◆ addQvar2Index()
|
inline |
repeated int32 qvar2_index = 2;
- Parameters
-
value The qvar2Index to add.
- Returns
- This builder for chaining.
Definition at line 885 of file MPQuadraticObjective.java.
◆ addRepeatedField()
|
inline |
Definition at line 610 of file MPQuadraticObjective.java.
◆ build()
|
inline |
Definition at line 552 of file MPQuadraticObjective.java.
◆ buildPartial()
|
inline |
Definition at line 561 of file MPQuadraticObjective.java.
◆ clear()
|
inline |
Definition at line 529 of file MPQuadraticObjective.java.
◆ clearCoefficient()
|
inline |
Must be finite.
repeated double coefficient = 3;
- Returns
- This builder for chaining.
Definition at line 1015 of file MPQuadraticObjective.java.
◆ clearField()
|
inline |
Definition at line 594 of file MPQuadraticObjective.java.
◆ clearOneof()
|
inline |
Definition at line 599 of file MPQuadraticObjective.java.
◆ clearQvar1Index()
|
inline |
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 829 of file MPQuadraticObjective.java.
◆ clearQvar2Index()
|
inline |
repeated int32 qvar2_index = 2;
- Returns
- This builder for chaining.
Definition at line 908 of file MPQuadraticObjective.java.
◆ clone()
|
inline |
Definition at line 584 of file MPQuadraticObjective.java.
◆ getCoefficient()
|
inline |
Must be finite.
repeated double coefficient = 3;
- Parameters
-
index The index of the element to return.
- Returns
- The coefficient at the given index.
Implements MPQuadraticObjectiveOrBuilder.
Definition at line 955 of file MPQuadraticObjective.java.
◆ getCoefficientCount()
|
inline |
Must be finite.
repeated double coefficient = 3;
- Returns
- The count of coefficient.
Implements MPQuadraticObjectiveOrBuilder.
Definition at line 943 of file MPQuadraticObjective.java.
◆ getCoefficientList()
|
inline |
Must be finite.
repeated double coefficient = 3;
- Returns
- A list containing the coefficient.
Implements MPQuadraticObjectiveOrBuilder.
Definition at line 931 of file MPQuadraticObjective.java.
◆ getDefaultInstanceForType()
|
inline |
Definition at line 547 of file MPQuadraticObjective.java.
◆ getDescriptor()
|
inlinestatic |
Definition at line 501 of file MPQuadraticObjective.java.
◆ getDescriptorForType()
|
inline |
Definition at line 542 of file MPQuadraticObjective.java.
◆ getQvar1Index()
|
inline |
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
-
index The index of the element to return.
- Returns
- The qvar1Index at the given index.
Implements MPQuadraticObjectiveOrBuilder.
Definition at line 745 of file MPQuadraticObjective.java.
◆ getQvar1IndexCount()
|
inline |
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 MPQuadraticObjectiveOrBuilder.
Definition at line 727 of file MPQuadraticObjective.java.
◆ getQvar1IndexList()
|
inline |
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 MPQuadraticObjectiveOrBuilder.
Definition at line 709 of file MPQuadraticObjective.java.
◆ getQvar2Index()
|
inline |
repeated int32 qvar2_index = 2;
- Parameters
-
index The index of the element to return.
- Returns
- The qvar2Index at the given index.
Implements MPQuadraticObjectiveOrBuilder.
Definition at line 864 of file MPQuadraticObjective.java.
◆ getQvar2IndexCount()
|
inline |
repeated int32 qvar2_index = 2;
- Returns
- The count of qvar2Index.
Implements MPQuadraticObjectiveOrBuilder.
Definition at line 856 of file MPQuadraticObjective.java.
◆ getQvar2IndexList()
|
inline |
repeated int32 qvar2_index = 2;
- Returns
- A list containing the qvar2Index.
Implements MPQuadraticObjectiveOrBuilder.
Definition at line 848 of file MPQuadraticObjective.java.
◆ internalGetFieldAccessorTable()
|
inlineprotected |
Definition at line 507 of file MPQuadraticObjective.java.
◆ isInitialized()
|
inline |
Definition at line 663 of file MPQuadraticObjective.java.
◆ mergeFrom() [1/3]
|
inline |
Definition at line 625 of file MPQuadraticObjective.java.
◆ mergeFrom() [2/3]
|
inline |
Definition at line 668 of file MPQuadraticObjective.java.
◆ mergeFrom() [3/3]
|
inline |
Definition at line 616 of file MPQuadraticObjective.java.
◆ mergeUnknownFields()
|
inline |
Definition at line 1028 of file MPQuadraticObjective.java.
◆ setCoefficient()
|
inline |
Must be finite.
repeated double coefficient = 3;
- Parameters
-
index The index to set the value at. value The coefficient to set.
- Returns
- This builder for chaining.
Definition at line 968 of file MPQuadraticObjective.java.
◆ setField()
|
inline |
Definition at line 588 of file MPQuadraticObjective.java.
◆ setQvar1Index()
|
inline |
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
-
index The index to set the value at. value The qvar1Index to set.
- Returns
- This builder for chaining.
Definition at line 764 of file MPQuadraticObjective.java.
◆ setQvar2Index()
|
inline |
repeated int32 qvar2_index = 2;
- Parameters
-
index The index to set the value at. value The qvar2Index to set.
- Returns
- This builder for chaining.
Definition at line 873 of file MPQuadraticObjective.java.
◆ setRepeatedField()
|
inline |
Definition at line 604 of file MPQuadraticObjective.java.
◆ setUnknownFields()
|
inline |
Definition at line 1022 of file MPQuadraticObjective.java.
The documentation for this class was generated from the following file: