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, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public 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.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessage.Builder<LinearObjective.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessage.Builder<LinearObjective.Builder>
public LinearObjective getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public LinearObjective build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public LinearObjective buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public LinearObjective.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom
in interface com.google.protobuf.Message.Builder
mergeFrom
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.MessageLiteOrBuilder
isInitialized
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.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<LinearObjective.Builder>
java.io.IOException
public 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 LinearObjectiveOrBuilder
public 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 LinearObjectiveOrBuilder
public 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 LinearObjectiveOrBuilder
index
- 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 LinearObjectiveOrBuilder
public int getCoefficientsCount()
repeated int64 coefficients = 2;
getCoefficientsCount
in interface LinearObjectiveOrBuilder
public long getCoefficients(int index)
repeated int64 coefficients = 2;
getCoefficients
in interface LinearObjectiveOrBuilder
index
- 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 LinearObjectiveOrBuilder
public 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 LinearObjectiveOrBuilder
public 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 LinearObjectiveOrBuilder
public double getScalingFactor()
optional double scaling_factor = 4 [default = 1];
getScalingFactor
in interface LinearObjectiveOrBuilder
public 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 © 2025. All rights reserved.