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

Public Member Functions

Builder clear ()
 
com.google.protobuf.Descriptors.Descriptor getDescriptorForType ()
 
com.google.ortools.linearsolver.MPQuadraticConstraint getDefaultInstanceForType ()
 
com.google.ortools.linearsolver.MPQuadraticConstraint build ()
 
com.google.ortools.linearsolver.MPQuadraticConstraint buildPartial ()
 
Builder clone ()
 
Builder setField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder clearField (com.google.protobuf.Descriptors.FieldDescriptor field)
 
Builder clearOneof (com.google.protobuf.Descriptors.OneofDescriptor oneof)
 
Builder setRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
 
Builder addRepeatedField (com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
 
Builder mergeFrom (com.google.protobuf.Message other)
 
Builder mergeFrom (com.google.ortools.linearsolver.MPQuadraticConstraint 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 > getVarIndexList ()
 
int getVarIndexCount ()
 
int getVarIndex (int index)
 
Builder setVarIndex (int index, int value)
 
Builder addVarIndex (int value)
 
Builder addAllVarIndex (java.lang.Iterable<? extends java.lang.Integer > values)
 
Builder clearVarIndex ()
 
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 ()
 
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 > getQcoefficientList ()
 
int getQcoefficientCount ()
 
double getQcoefficient (int index)
 
Builder setQcoefficient (int index, double value)
 
Builder addQcoefficient (double value)
 
Builder addAllQcoefficient (java.lang.Iterable<? extends java.lang.Double > values)
 
Builder clearQcoefficient ()
 
boolean hasLowerBound ()
 
double getLowerBound ()
 
Builder setLowerBound (double value)
 
Builder clearLowerBound ()
 
boolean hasUpperBound ()
 
double getUpperBound ()
 
Builder setUpperBound (double value)
 
Builder clearUpperBound ()
 
final Builder setUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 
final Builder mergeUnknownFields (final com.google.protobuf.UnknownFieldSet unknownFields)
 

Static Public Member Functions

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

Protected Member Functions

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

Detailed Description

Quadratic constraints of the form lb <= sum a_i x_i + sum b_ij x_i x_j <= ub,
where a, b, lb and ub are constants, and x are the model's variables.
Quadratic matrices that are Positive Semi-Definite, Second-Order Cones or
rotated Second-Order Cones are always accepted. Other forms may or may not be
accepted depending on the underlying solver used.
See https://scip.zib.de/doc/html/cons__quadratic_8h.php and
https://www.gurobi.com/documentation/9.0/refman/constraints.html#subsubsection:QuadraticConstraints

Protobuf type operations_research.MPQuadraticConstraint

Definition at line 605 of file MPQuadraticConstraint.java.

Member Function Documentation

◆ addAllCoefficient()

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

repeated double coefficient = 2;

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

Definition at line 1175 of file MPQuadraticConstraint.java.

◆ addAllQcoefficient()

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

repeated double qcoefficient = 5;

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

Definition at line 1531 of file MPQuadraticConstraint.java.

◆ addAllQvar1Index()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllQvar1Index ( java.lang.Iterable<? extends java.lang.Integer > values)
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[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 = 3;

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

Definition at line 1323 of file MPQuadraticConstraint.java.

◆ addAllQvar2Index()

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

repeated int32 qvar2_index = 4;

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

Definition at line 1417 of file MPQuadraticConstraint.java.

◆ addAllVarIndex()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addAllVarIndex ( java.lang.Iterable<? extends java.lang.Integer > values)
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
`var_index` are variable indices w.r.t the "variable" field in
MPModelProto, and should be unique.

repeated int32 var_index = 1;

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

Definition at line 1054 of file MPQuadraticConstraint.java.

◆ addCoefficient()

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

repeated double coefficient = 2;

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

Definition at line 1158 of file MPQuadraticConstraint.java.

◆ addQcoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addQcoefficient ( double value)
Must be finite.

repeated double qcoefficient = 5;

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

Definition at line 1514 of file MPQuadraticConstraint.java.

◆ addQvar1Index()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addQvar1Index ( int value)
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[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 = 3;

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

Definition at line 1300 of file MPQuadraticConstraint.java.

◆ addQvar2Index()

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

repeated int32 qvar2_index = 4;

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

Definition at line 1404 of file MPQuadraticConstraint.java.

◆ addRepeatedField()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 735 of file MPQuadraticConstraint.java.

◆ addVarIndex()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.addVarIndex ( int value)
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
`var_index` are variable indices w.r.t the "variable" field in
MPModelProto, and should be unique.

repeated int32 var_index = 1;

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

Definition at line 1034 of file MPQuadraticConstraint.java.

◆ build()

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

Definition at line 658 of file MPQuadraticConstraint.java.

◆ buildPartial()

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

Definition at line 667 of file MPQuadraticConstraint.java.

◆ clear()

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

Definition at line 633 of file MPQuadraticConstraint.java.

◆ clearCoefficient()

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

repeated double coefficient = 2;

Returns
This builder for chaining.

Definition at line 1192 of file MPQuadraticConstraint.java.

◆ clearField()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearField ( com.google.protobuf.Descriptors.FieldDescriptor field)

Definition at line 719 of file MPQuadraticConstraint.java.

◆ clearLowerBound()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearLowerBound ( )
lower_bound must be <= upper_bound.

optional double lower_bound = 6 [default = -inf];

Returns
This builder for chaining.

Definition at line 1604 of file MPQuadraticConstraint.java.

◆ clearOneof()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearOneof ( com.google.protobuf.Descriptors.OneofDescriptor oneof)

Definition at line 724 of file MPQuadraticConstraint.java.

◆ clearQcoefficient()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQcoefficient ( )
Must be finite.

repeated double qcoefficient = 5;

Returns
This builder for chaining.

Definition at line 1548 of file MPQuadraticConstraint.java.

◆ clearQvar1Index()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearQvar1Index ( )
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[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 = 3;

Returns
This builder for chaining.

Definition at line 1346 of file MPQuadraticConstraint.java.

◆ clearQvar2Index()

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

repeated int32 qvar2_index = 4;

Returns
This builder for chaining.

Definition at line 1430 of file MPQuadraticConstraint.java.

◆ clearUpperBound()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearUpperBound ( )

optional double upper_bound = 7 [default = inf];

Returns
This builder for chaining.

Definition at line 1644 of file MPQuadraticConstraint.java.

◆ clearVarIndex()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clearVarIndex ( )
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
`var_index` are variable indices w.r.t the "variable" field in
MPModelProto, and should be unique.

repeated int32 var_index = 1;

Returns
This builder for chaining.

Definition at line 1074 of file MPQuadraticConstraint.java.

◆ clone()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.clone ( )

Definition at line 709 of file MPQuadraticConstraint.java.

◆ getCoefficient()

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

repeated double coefficient = 2;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1127 of file MPQuadraticConstraint.java.

◆ getCoefficientCount()

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

repeated double coefficient = 2;

Returns
The count of coefficient.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1115 of file MPQuadraticConstraint.java.

◆ getCoefficientList()

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

repeated double coefficient = 2;

Returns
A list containing the coefficient.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1103 of file MPQuadraticConstraint.java.

◆ getDefaultInstanceForType()

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

Definition at line 653 of file MPQuadraticConstraint.java.

◆ getDescriptor()

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

Definition at line 610 of file MPQuadraticConstraint.java.

◆ getDescriptorForType()

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

Definition at line 648 of file MPQuadraticConstraint.java.

◆ getLowerBound()

double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getLowerBound ( )
lower_bound must be <= upper_bound.

optional double lower_bound = 6 [default = -inf];

Returns
The lowerBound.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1577 of file MPQuadraticConstraint.java.

◆ getQcoefficient()

double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQcoefficient ( int index)
Must be finite.

repeated double qcoefficient = 5;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1483 of file MPQuadraticConstraint.java.

◆ getQcoefficientCount()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQcoefficientCount ( )
Must be finite.

repeated double qcoefficient = 5;

Returns
The count of qcoefficient.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1471 of file MPQuadraticConstraint.java.

◆ getQcoefficientList()

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

repeated double qcoefficient = 5;

Returns
A list containing the qcoefficient.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1459 of file MPQuadraticConstraint.java.

◆ getQvar1Index()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar1Index ( int index)
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[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 = 3;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1257 of file MPQuadraticConstraint.java.

◆ getQvar1IndexCount()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar1IndexCount ( )
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[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 = 3;

Returns
The count of qvar1Index.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1239 of file MPQuadraticConstraint.java.

◆ getQvar1IndexList()

java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getQvar1IndexList ( )
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[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 = 3;

Returns
A list containing the qvar1Index.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1221 of file MPQuadraticConstraint.java.

◆ getQvar2Index()

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

repeated int32 qvar2_index = 4;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1381 of file MPQuadraticConstraint.java.

◆ getQvar2IndexCount()

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

repeated int32 qvar2_index = 4;

Returns
The count of qvar2Index.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1373 of file MPQuadraticConstraint.java.

◆ getQvar2IndexList()

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

repeated int32 qvar2_index = 4;

Returns
A list containing the qvar2Index.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1365 of file MPQuadraticConstraint.java.

◆ getUpperBound()

double com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getUpperBound ( )

optional double upper_bound = 7 [default = inf];

Returns
The upperBound.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1625 of file MPQuadraticConstraint.java.

◆ getVarIndex()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getVarIndex ( int index)
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
`var_index` are variable indices w.r.t the "variable" field in
MPModelProto, and should be unique.

repeated int32 var_index = 1;

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

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 997 of file MPQuadraticConstraint.java.

◆ getVarIndexCount()

int com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getVarIndexCount ( )
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
`var_index` are variable indices w.r.t the "variable" field in
MPModelProto, and should be unique.

repeated int32 var_index = 1;

Returns
The count of varIndex.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 982 of file MPQuadraticConstraint.java.

◆ getVarIndexList()

java.util.List< java.lang.Integer > com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.getVarIndexList ( )
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
`var_index` are variable indices w.r.t the "variable" field in
MPModelProto, and should be unique.

repeated int32 var_index = 1;

Returns
A list containing the varIndex.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 967 of file MPQuadraticConstraint.java.

◆ hasLowerBound()

boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.hasLowerBound ( )
lower_bound must be <= upper_bound.

optional double lower_bound = 6 [default = -inf];

Returns
Whether the lowerBound field is set.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1565 of file MPQuadraticConstraint.java.

◆ hasUpperBound()

boolean com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.hasUpperBound ( )

optional double upper_bound = 7 [default = inf];

Returns
Whether the upperBound field is set.

Implements com.google.ortools.linearsolver.MPQuadraticConstraintOrBuilder.

Definition at line 1617 of file MPQuadraticConstraint.java.

◆ internalGetFieldAccessorTable()

com.google.protobuf.GeneratedMessageV3.FieldAccessorTable com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.internalGetFieldAccessorTable ( )
protected

Definition at line 616 of file MPQuadraticConstraint.java.

◆ isInitialized()

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

Definition at line 819 of file MPQuadraticConstraint.java.

◆ mergeFrom() [1/3]

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

Definition at line 750 of file MPQuadraticConstraint.java.

◆ mergeFrom() [2/3]

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

Definition at line 824 of file MPQuadraticConstraint.java.

◆ mergeFrom() [3/3]

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

Definition at line 741 of file MPQuadraticConstraint.java.

◆ mergeUnknownFields()

final Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.mergeUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 1657 of file MPQuadraticConstraint.java.

◆ setCoefficient()

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

repeated double coefficient = 2;

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

Definition at line 1140 of file MPQuadraticConstraint.java.

◆ setField()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setField ( com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value )

Definition at line 713 of file MPQuadraticConstraint.java.

◆ setLowerBound()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setLowerBound ( double value)
lower_bound must be <= upper_bound.

optional double lower_bound = 6 [default = -inf];

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

Definition at line 1589 of file MPQuadraticConstraint.java.

◆ setQcoefficient()

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

repeated double qcoefficient = 5;

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

Definition at line 1496 of file MPQuadraticConstraint.java.

◆ setQvar1Index()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setQvar1Index ( int index,
int value )
Sparse representation of quadratic terms in the quadratic constraint, where
term i is qvar1_index[i] * qvar2_index[i] * qcoefficient[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 = 3;

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

Definition at line 1276 of file MPQuadraticConstraint.java.

◆ setQvar2Index()

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

repeated int32 qvar2_index = 4;

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

Definition at line 1390 of file MPQuadraticConstraint.java.

◆ setRepeatedField()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setRepeatedField ( com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value )

Definition at line 729 of file MPQuadraticConstraint.java.

◆ setUnknownFields()

final Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setUnknownFields ( final com.google.protobuf.UnknownFieldSet unknownFields)

Definition at line 1651 of file MPQuadraticConstraint.java.

◆ setUpperBound()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setUpperBound ( double value)

optional double upper_bound = 7 [default = inf];

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

Definition at line 1633 of file MPQuadraticConstraint.java.

◆ setVarIndex()

Builder com.google.ortools.linearsolver.MPQuadraticConstraint.Builder.setVarIndex ( int index,
int value )
Sparse representation of linear terms in the quadratic constraint, where
term i is var_index[i] * coefficient[i].
`var_index` are variable indices w.r.t the "variable" field in
MPModelProto, and should be unique.

repeated int32 var_index = 1;

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

Definition at line 1013 of file MPQuadraticConstraint.java.


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