Java Reference

Java Reference

MPQuadraticObjective

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

operations_research.MPQuadraticObjective

Definition at line 17 of file MPQuadraticObjective.java.

Classes

class  Builder
 

Public Member Functions

.lang.Override final com.google.protobuf.UnknownFieldSet getUnknownFields ()
 
.lang.Override java.util.List< java.lang.Integer > getQvar1IndexList ()
 
int getQvar1IndexCount ()
 
int getQvar1Index (int index)
 
.lang.Override 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...
 
.lang.Override java.util.List< java.lang.Double > getCoefficientList ()
 
int getCoefficientCount ()
 
double getCoefficient (int index)
 
.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< MPQuadraticObjectivegetParserForType ()
 
.lang.Override com.google.ortools.linearsolver.MPQuadraticObjective getDefaultInstanceForType ()
 

Static Public Member Functions

static final com.google.protobuf.Descriptors.Descriptor getDescriptor ()
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseDelimitedFrom (java.io.InputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseDelimitedFrom (java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (com.google.protobuf.CodedInputStream input) throws java.io.IOException
 
static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom (com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
 
static Builder newBuilder ()
 
static Builder newBuilder (com.google.ortools.linearsolver.MPQuadraticObjective prototype)
 
static com.google.ortools.linearsolver.MPQuadraticObjective getDefaultInstance ()
 
static com.google.protobuf.Parser< MPQuadraticObjectiveparser ()
 

Static Public Attributes

static final int QVAR1_INDEX_FIELD_NUMBER = 1
 
static final int QVAR2_INDEX_FIELD_NUMBER = 2
 
static final int COEFFICIENT_FIELD_NUMBER = 3
 
.lang.Deprecated static final com.google.protobuf.Parser< MPQuadraticObjectivePARSER
 

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)
inline

Definition at line 352 of file MPQuadraticObjective.java.

◆ getCoefficient()

double getCoefficient ( int  index)
inline
Must be finite.

repeated double coefficient = 3;

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

Implements MPQuadraticObjectiveOrBuilder.

Definition at line 286 of file MPQuadraticObjective.java.

◆ getCoefficientCount()

int getCoefficientCount ( )
inline
Must be finite.

repeated double coefficient = 3;

Returns
The count of coefficient.

Implements MPQuadraticObjectiveOrBuilder.

Definition at line 274 of file MPQuadraticObjective.java.

◆ getCoefficientList()

.lang.Override java.util.List<java.lang.Double> getCoefficientList ( )
inline
Must be finite.

repeated double coefficient = 3;

Returns
A list containing the coefficient.

Implements MPQuadraticObjectiveOrBuilder.

Definition at line 263 of file MPQuadraticObjective.java.

◆ getDefaultInstance()

static com.google.ortools.linearsolver.MPQuadraticObjective getDefaultInstance ( )
inlinestatic

Definition at line 1043 of file MPQuadraticObjective.java.

◆ getDefaultInstanceForType()

.lang.Override com.google.ortools.linearsolver.MPQuadraticObjective getDefaultInstanceForType ( )
inline

Definition at line 1068 of file MPQuadraticObjective.java.

◆ getDescriptor()

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

Definition at line 155 of file MPQuadraticObjective.java.

◆ getParserForType()

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

Definition at line 1063 of file MPQuadraticObjective.java.

◆ getQvar1Index()

int getQvar1Index ( int  index)
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
indexThe index of the element to return.
Returns
The qvar1Index at the given index.

Implements MPQuadraticObjectiveOrBuilder.

Definition at line 220 of file MPQuadraticObjective.java.

◆ getQvar1IndexCount()

int 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 202 of file MPQuadraticObjective.java.

◆ getQvar1IndexList()

.lang.Override java.util.List<java.lang.Integer> 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 185 of file MPQuadraticObjective.java.

◆ getQvar2Index()

int getQvar2Index ( int  index)
inline

repeated int32 qvar2_index = 2;

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

Implements MPQuadraticObjectiveOrBuilder.

Definition at line 247 of file MPQuadraticObjective.java.

◆ getQvar2IndexCount()

int getQvar2IndexCount ( )
inline

repeated int32 qvar2_index = 2;

Returns
The count of qvar2Index.

Implements MPQuadraticObjectiveOrBuilder.

Definition at line 239 of file MPQuadraticObjective.java.

◆ getQvar2IndexList()

.lang.Override java.util.List<java.lang.Integer> getQvar2IndexList ( )
inline

repeated int32 qvar2_index = 2;

Returns
A list containing the qvar2Index.

Implements MPQuadraticObjectiveOrBuilder.

Definition at line 232 of file MPQuadraticObjective.java.

◆ getSerializedSize()

.lang.Override int getSerializedSize ( )
inline

Definition at line 317 of file MPQuadraticObjective.java.

◆ getUnknownFields()

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

Definition at line 41 of file MPQuadraticObjective.java.

◆ hashCode()

.lang.Override int hashCode ( )
inline

Definition at line 372 of file MPQuadraticObjective.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 161 of file MPQuadraticObjective.java.

◆ isInitialized()

.lang.Override final boolean isInitialized ( )
inline

Definition at line 292 of file MPQuadraticObjective.java.

◆ newBuilder() [1/2]

static Builder newBuilder ( )
inlinestatic

Definition at line 467 of file MPQuadraticObjective.java.

◆ newBuilder() [2/2]

static Builder newBuilder ( com.google.ortools.linearsolver.MPQuadraticObjective  prototype)
inlinestatic

Definition at line 470 of file MPQuadraticObjective.java.

◆ newBuilderForType() [1/2]

.lang.Override Builder newBuilderForType ( )
inline

Definition at line 466 of file MPQuadraticObjective.java.

◆ newBuilderForType() [2/2]

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

Definition at line 480 of file MPQuadraticObjective.java.

◆ newInstance()

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

Definition at line 34 of file MPQuadraticObjective.java.

◆ parseDelimitedFrom() [1/2]

static com.google.ortools.linearsolver.MPQuadraticObjective parseDelimitedFrom ( java.io.InputStream  input) throws java.io.IOException
inlinestatic

Definition at line 439 of file MPQuadraticObjective.java.

◆ parseDelimitedFrom() [2/2]

static com.google.ortools.linearsolver.MPQuadraticObjective parseDelimitedFrom ( java.io.InputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException
inlinestatic

Definition at line 444 of file MPQuadraticObjective.java.

◆ parseFrom() [1/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( byte[]  data) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 417 of file MPQuadraticObjective.java.

◆ parseFrom() [2/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( byte[]  data,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 421 of file MPQuadraticObjective.java.

◆ parseFrom() [3/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( com.google.protobuf.ByteString  data) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 406 of file MPQuadraticObjective.java.

◆ parseFrom() [4/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( com.google.protobuf.ByteString  data,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 411 of file MPQuadraticObjective.java.

◆ parseFrom() [5/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( com.google.protobuf.CodedInputStream  input) throws java.io.IOException
inlinestatic

Definition at line 451 of file MPQuadraticObjective.java.

◆ parseFrom() [6/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( com.google.protobuf.CodedInputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException
inlinestatic

Definition at line 457 of file MPQuadraticObjective.java.

◆ parseFrom() [7/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( java.io.InputStream  input) throws java.io.IOException
inlinestatic

Definition at line 427 of file MPQuadraticObjective.java.

◆ parseFrom() [8/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( java.io.InputStream  input,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws java.io.IOException
inlinestatic

Definition at line 432 of file MPQuadraticObjective.java.

◆ parseFrom() [9/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( java.nio.ByteBuffer  data) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 395 of file MPQuadraticObjective.java.

◆ parseFrom() [10/10]

static com.google.ortools.linearsolver.MPQuadraticObjective parseFrom ( java.nio.ByteBuffer  data,
com.google.protobuf.ExtensionRegistryLite  extensionRegistry 
) throws com.google.protobuf.InvalidProtocolBufferException
inlinestatic

Definition at line 400 of file MPQuadraticObjective.java.

◆ parser()

static com.google.protobuf.Parser<MPQuadraticObjective> parser ( )
inlinestatic

Definition at line 1058 of file MPQuadraticObjective.java.

◆ toBuilder()

.lang.Override Builder toBuilder ( )
inline

Definition at line 474 of file MPQuadraticObjective.java.

◆ writeTo()

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

Definition at line 302 of file MPQuadraticObjective.java.

Member Data Documentation

◆ COEFFICIENT_FIELD_NUMBER

final int COEFFICIENT_FIELD_NUMBER = 3
static

Definition at line 251 of file MPQuadraticObjective.java.

◆ PARSER

.lang.Deprecated static final com.google.protobuf.Parser<MPQuadraticObjective> PARSER
static
Initial value:
= new com.google.protobuf.AbstractParser<MPQuadraticObjective>() {
@java.lang.Override
public MPQuadraticObjective parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MPQuadraticObjective(input, extensionRegistry);
}
}

Definition at line 1048 of file MPQuadraticObjective.java.

◆ QVAR1_INDEX_FIELD_NUMBER

final int QVAR1_INDEX_FIELD_NUMBER = 1
static

Definition at line 167 of file MPQuadraticObjective.java.

◆ QVAR2_INDEX_FIELD_NUMBER

final int QVAR2_INDEX_FIELD_NUMBER = 2
static

Definition at line 224 of file MPQuadraticObjective.java.


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