Package com.google.ortools.sat
Interface LinearObjectiveOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
LinearObjective,LinearObjective.Builder
public interface LinearObjectiveOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetCoefficients(int index)repeated int64 coefficients = 2;intgetCoefficientsCount()repeated int64 coefficients = 2;java.util.List<java.lang.Long>getCoefficientsList()repeated int64 coefficients = 2;intgetLiterals(int index)The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment.intgetLiteralsCount()The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment.java.util.List<java.lang.Integer>getLiteralsList()The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment.doublegetOffset()For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above.doublegetScalingFactor()optional double scaling_factor = 4 [default = 1];booleanhasOffset()For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above.booleanhasScalingFactor()optional double scaling_factor = 4 [default = 1];-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getLiteralsList
java.util.List<java.lang.Integer> getLiteralsList()
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;- Returns:
- A list containing the literals.
-
getLiteralsCount
int getLiteralsCount()
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;- Returns:
- The count of literals.
-
getLiterals
int getLiterals(int index)
The goal is always to minimize the linear Boolean formula defined by these two fields: sum_i literal_i * coefficient_i where literal_i is 1 iff literal_i is true in a given assignment. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;- Parameters:
index- The index of the element to return.- Returns:
- The literals at the given index.
-
getCoefficientsList
java.util.List<java.lang.Long> getCoefficientsList()
repeated int64 coefficients = 2;- Returns:
- A list containing the coefficients.
-
getCoefficientsCount
int getCoefficientsCount()
repeated int64 coefficients = 2;- Returns:
- The count of coefficients.
-
getCoefficients
long getCoefficients(int index)
repeated int64 coefficients = 2;- Parameters:
index- The index of the element to return.- Returns:
- The coefficients at the given index.
-
hasOffset
boolean hasOffset()
For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above. Note that this is not what we minimize, but it is what we display. In particular if scaling_factor is negative, then the "real" problem is a maximization problem, even if the "internal" objective is minimized.
optional double offset = 3 [default = 0];- Returns:
- Whether the offset field is set.
-
getOffset
double getOffset()
For a given variable assignment, the "real" problem objective value is 'scaling_factor * (minimization_objective + offset)' where 'minimization_objective is the one defined just above. Note that this is not what we minimize, but it is what we display. In particular if scaling_factor is negative, then the "real" problem is a maximization problem, even if the "internal" objective is minimized.
optional double offset = 3 [default = 0];- Returns:
- The offset.
-
hasScalingFactor
boolean hasScalingFactor()
optional double scaling_factor = 4 [default = 1];- Returns:
- Whether the scalingFactor field is set.
-
getScalingFactor
double getScalingFactor()
optional double scaling_factor = 4 [default = 1];- Returns:
- The scalingFactor.
-
-