public static final class LinearObjective.Builder extends com.google.protobuf.GeneratedMessage.Builder<LinearObjective.Builder> implements LinearObjectiveOrBuilder
The objective of an optimization problem.Protobuf type
operations_research.sat.LinearObjective| Modifier and Type | Method and Description |
|---|---|
LinearObjective.Builder |
addAllCoefficients(java.lang.Iterable<? extends java.lang.Long> values)
repeated int64 coefficients = 2; |
LinearObjective.Builder |
addAllLiterals(java.lang.Iterable<? extends java.lang.Integer> values)
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.
|
LinearObjective.Builder |
addCoefficients(long value)
repeated int64 coefficients = 2; |
LinearObjective.Builder |
addLiterals(int value)
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.
|
LinearObjective |
build() |
LinearObjective |
buildPartial() |
LinearObjective.Builder |
clear() |
LinearObjective.Builder |
clearCoefficients()
repeated int64 coefficients = 2; |
LinearObjective.Builder |
clearLiterals()
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.
|
LinearObjective.Builder |
clearOffset()
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.
|
LinearObjective.Builder |
clearScalingFactor()
optional double scaling_factor = 4 [default = 1]; |
long |
getCoefficients(int index)
repeated int64 coefficients = 2; |
int |
getCoefficientsCount()
repeated int64 coefficients = 2; |
java.util.List<java.lang.Long> |
getCoefficientsList()
repeated int64 coefficients = 2; |
LinearObjective |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
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.
|
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.
|
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.
|
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.
|
double |
getScalingFactor()
optional double scaling_factor = 4 [default = 1]; |
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.
|
boolean |
hasScalingFactor()
optional double scaling_factor = 4 [default = 1]; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
LinearObjective.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
LinearObjective.Builder |
mergeFrom(LinearObjective other) |
LinearObjective.Builder |
mergeFrom(com.google.protobuf.Message other) |
LinearObjective.Builder |
setCoefficients(int index,
long value)
repeated int64 coefficients = 2; |
LinearObjective.Builder |
setLiterals(int index,
int value)
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.
|
LinearObjective.Builder |
setOffset(double value)
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.
|
LinearObjective.Builder |
setScalingFactor(double value)
optional double scaling_factor = 4 [default = 1]; |
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<LinearObjective.Builder>public LinearObjective.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<LinearObjective.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<LinearObjective.Builder>public LinearObjective getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic LinearObjective build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic LinearObjective buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic LinearObjective.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LinearObjective.Builder>public LinearObjective.Builder mergeFrom(LinearObjective other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<LinearObjective.Builder>public LinearObjective.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LinearObjective.Builder>java.io.IOExceptionpublic 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;getLiteralsList in interface LinearObjectiveOrBuilderpublic 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;getLiteralsCount in interface LinearObjectiveOrBuilderpublic 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;getLiterals in interface LinearObjectiveOrBuilderindex - The index of the element to return.public LinearObjective.Builder setLiterals(int index, int value)
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;index - The index to set the value at.value - The literals to set.public LinearObjective.Builder addLiterals(int value)
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;value - The literals to add.public LinearObjective.Builder addAllLiterals(java.lang.Iterable<? extends java.lang.Integer> values)
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;values - The literals to add.public LinearObjective.Builder clearLiterals()
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;public java.util.List<java.lang.Long> getCoefficientsList()
repeated int64 coefficients = 2;getCoefficientsList in interface LinearObjectiveOrBuilderpublic int getCoefficientsCount()
repeated int64 coefficients = 2;getCoefficientsCount in interface LinearObjectiveOrBuilderpublic long getCoefficients(int index)
repeated int64 coefficients = 2;getCoefficients in interface LinearObjectiveOrBuilderindex - The index of the element to return.public LinearObjective.Builder setCoefficients(int index, long value)
repeated int64 coefficients = 2;index - The index to set the value at.value - The coefficients to set.public LinearObjective.Builder addCoefficients(long value)
repeated int64 coefficients = 2;value - The coefficients to add.public LinearObjective.Builder addAllCoefficients(java.lang.Iterable<? extends java.lang.Long> values)
repeated int64 coefficients = 2;values - The coefficients to add.public LinearObjective.Builder clearCoefficients()
repeated int64 coefficients = 2;public 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];hasOffset in interface LinearObjectiveOrBuilderpublic 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];getOffset in interface LinearObjectiveOrBuilderpublic LinearObjective.Builder setOffset(double value)
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];value - The offset to set.public LinearObjective.Builder clearOffset()
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];public boolean hasScalingFactor()
optional double scaling_factor = 4 [default = 1];hasScalingFactor in interface LinearObjectiveOrBuilderpublic double getScalingFactor()
optional double scaling_factor = 4 [default = 1];getScalingFactor in interface LinearObjectiveOrBuilderpublic LinearObjective.Builder setScalingFactor(double value)
optional double scaling_factor = 4 [default = 1];value - The scalingFactor to set.public LinearObjective.Builder clearScalingFactor()
optional double scaling_factor = 4 [default = 1];Copyright © 2024. All rights reserved.