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

Classes

class  Builder
 

Public Member Functions

java.util.List< java.lang.Integer > getQvar1IndexList ()
 
int getQvar1IndexCount ()
 
int getQvar1Index (int index)
 
java.util.List< java.lang.Integer > getQvar2IndexList ()
 
int getQvar2IndexCount ()
 
int getQvar2Index (int index)
 
java.util.List< java.lang.Double > getCoefficientList ()
 
int getCoefficientCount ()
 
double getCoefficient (int index)
 
final boolean isInitialized ()
 
void writeTo (com.google.protobuf.CodedOutputStream output) throws java.io.IOException
 
int getSerializedSize ()
 
boolean equals (final java.lang.Object obj)
 
int hashCode ()
 
Builder newBuilderForType ()
 
Builder toBuilder ()
 
com.google.protobuf.Parser< MPQuadraticObjectivegetParserForType ()
 
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
 

Protected Member Functions

com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable ()
 
Builder newBuilderForType (com.google.protobuf.GeneratedMessage.BuilderParent parent)
 

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

Member Function Documentation

◆ equals()

boolean com.google.ortools.linearsolver.MPQuadraticObjective.equals ( final java.lang.Object obj)

Definition at line 247 of file MPQuadraticObjective.java.

◆ getCoefficient()

double com.google.ortools.linearsolver.MPQuadraticObjective.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 181 of file MPQuadraticObjective.java.

◆ getCoefficientCount()

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

repeated double coefficient = 3;

Returns
The count of coefficient.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 169 of file MPQuadraticObjective.java.

◆ getCoefficientList()

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

repeated double coefficient = 3;

Returns
A list containing the coefficient.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 158 of file MPQuadraticObjective.java.

◆ getDefaultInstance()

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

Definition at line 976 of file MPQuadraticObjective.java.

◆ getDefaultInstanceForType()

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

Definition at line 1012 of file MPQuadraticObjective.java.

◆ getDescriptor()

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

Definition at line 44 of file MPQuadraticObjective.java.

◆ getParserForType()

com.google.protobuf.Parser< MPQuadraticObjective > com.google.ortools.linearsolver.MPQuadraticObjective.getParserForType ( )

Definition at line 1007 of file MPQuadraticObjective.java.

◆ getQvar1Index()

int com.google.ortools.linearsolver.MPQuadraticObjective.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 111 of file MPQuadraticObjective.java.

◆ getQvar1IndexCount()

int com.google.ortools.linearsolver.MPQuadraticObjective.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 93 of file MPQuadraticObjective.java.

◆ getQvar1IndexList()

java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticObjective.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 76 of file MPQuadraticObjective.java.

◆ getQvar2Index()

int com.google.ortools.linearsolver.MPQuadraticObjective.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 140 of file MPQuadraticObjective.java.

◆ getQvar2IndexCount()

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

repeated int32 qvar2_index = 2;

Returns
The count of qvar2Index.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 132 of file MPQuadraticObjective.java.

◆ getQvar2IndexList()

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

repeated int32 qvar2_index = 2;

Returns
A list containing the qvar2Index.

Implements com.google.ortools.linearsolver.MPQuadraticObjectiveOrBuilder.

Definition at line 125 of file MPQuadraticObjective.java.

◆ getSerializedSize()

int com.google.ortools.linearsolver.MPQuadraticObjective.getSerializedSize ( )

Definition at line 212 of file MPQuadraticObjective.java.

◆ hashCode()

int com.google.ortools.linearsolver.MPQuadraticObjective.hashCode ( )

Definition at line 267 of file MPQuadraticObjective.java.

◆ internalGetFieldAccessorTable()

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

Definition at line 50 of file MPQuadraticObjective.java.

◆ isInitialized()

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

Definition at line 187 of file MPQuadraticObjective.java.

◆ newBuilder() [1/2]

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

Definition at line 364 of file MPQuadraticObjective.java.

◆ newBuilder() [2/2]

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

Definition at line 367 of file MPQuadraticObjective.java.

◆ newBuilderForType() [1/2]

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

Definition at line 363 of file MPQuadraticObjective.java.

◆ newBuilderForType() [2/2]

Builder com.google.ortools.linearsolver.MPQuadraticObjective.newBuilderForType ( com.google.protobuf.GeneratedMessage.BuilderParent parent)
protected

Definition at line 377 of file MPQuadraticObjective.java.

◆ parseDelimitedFrom() [1/2]

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

Definition at line 335 of file MPQuadraticObjective.java.

◆ parseDelimitedFrom() [2/2]

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

Definition at line 341 of file MPQuadraticObjective.java.

◆ parseFrom() [1/10]

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

Definition at line 312 of file MPQuadraticObjective.java.

◆ parseFrom() [2/10]

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

Definition at line 316 of file MPQuadraticObjective.java.

◆ parseFrom() [3/10]

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

Definition at line 301 of file MPQuadraticObjective.java.

◆ parseFrom() [4/10]

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

Definition at line 306 of file MPQuadraticObjective.java.

◆ parseFrom() [5/10]

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

Definition at line 348 of file MPQuadraticObjective.java.

◆ parseFrom() [6/10]

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

Definition at line 354 of file MPQuadraticObjective.java.

◆ parseFrom() [7/10]

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

Definition at line 322 of file MPQuadraticObjective.java.

◆ parseFrom() [8/10]

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

Definition at line 327 of file MPQuadraticObjective.java.

◆ parseFrom() [9/10]

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

Definition at line 290 of file MPQuadraticObjective.java.

◆ parseFrom() [10/10]

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

Definition at line 295 of file MPQuadraticObjective.java.

◆ parser()

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

Definition at line 1002 of file MPQuadraticObjective.java.

◆ toBuilder()

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

Definition at line 371 of file MPQuadraticObjective.java.

◆ writeTo()

void com.google.ortools.linearsolver.MPQuadraticObjective.writeTo ( com.google.protobuf.CodedOutputStream output) throws java.io.IOException

Definition at line 197 of file MPQuadraticObjective.java.

Member Data Documentation

◆ COEFFICIENT_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPQuadraticObjective.COEFFICIENT_FIELD_NUMBER = 3
static

Definition at line 144 of file MPQuadraticObjective.java.

◆ QVAR1_INDEX_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPQuadraticObjective.QVAR1_INDEX_FIELD_NUMBER = 1
static

Definition at line 56 of file MPQuadraticObjective.java.

◆ QVAR2_INDEX_FIELD_NUMBER

final int com.google.ortools.linearsolver.MPQuadraticObjective.QVAR2_INDEX_FIELD_NUMBER = 2
static

Definition at line 115 of file MPQuadraticObjective.java.


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