public static final class LinearBooleanConstraint.Builder extends com.google.protobuf.GeneratedMessage.Builder<LinearBooleanConstraint.Builder> implements LinearBooleanConstraintOrBuilder
A linear Boolean constraint which is a bounded sum of linear terms. Each term beeing a literal times an integer coefficient. If we assume that a literal takes the value 1 if it is true and 0 otherwise, the constraint is: lower_bound <= ... + coefficients[i] * literals[i] + ... <= upper_boundProtobuf type
operations_research.sat.LinearBooleanConstraint| Modifier and Type | Method and Description |
|---|---|
LinearBooleanConstraint.Builder |
addAllCoefficients(java.lang.Iterable<? extends java.lang.Long> values)
repeated int64 coefficients = 2; |
LinearBooleanConstraint.Builder |
addAllLiterals(java.lang.Iterable<? extends java.lang.Integer> values)
Linear terms involved in this constraint.
|
LinearBooleanConstraint.Builder |
addCoefficients(long value)
repeated int64 coefficients = 2; |
LinearBooleanConstraint.Builder |
addLiterals(int value)
Linear terms involved in this constraint.
|
LinearBooleanConstraint |
build() |
LinearBooleanConstraint |
buildPartial() |
LinearBooleanConstraint.Builder |
clear() |
LinearBooleanConstraint.Builder |
clearCoefficients()
repeated int64 coefficients = 2; |
LinearBooleanConstraint.Builder |
clearLiterals()
Linear terms involved in this constraint.
|
LinearBooleanConstraint.Builder |
clearLowerBound()
Optional lower (resp.
|
LinearBooleanConstraint.Builder |
clearName()
The name of this constraint.
|
LinearBooleanConstraint.Builder |
clearUpperBound()
optional int64 upper_bound = 4; |
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; |
LinearBooleanConstraint |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
int |
getLiterals(int index)
Linear terms involved in this constraint.
|
int |
getLiteralsCount()
Linear terms involved in this constraint.
|
java.util.List<java.lang.Integer> |
getLiteralsList()
Linear terms involved in this constraint.
|
long |
getLowerBound()
Optional lower (resp.
|
java.lang.String |
getName()
The name of this constraint.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of this constraint.
|
long |
getUpperBound()
optional int64 upper_bound = 4; |
boolean |
hasLowerBound()
Optional lower (resp.
|
boolean |
hasName()
The name of this constraint.
|
boolean |
hasUpperBound()
optional int64 upper_bound = 4; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
LinearBooleanConstraint.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
LinearBooleanConstraint.Builder |
mergeFrom(LinearBooleanConstraint other) |
LinearBooleanConstraint.Builder |
mergeFrom(com.google.protobuf.Message other) |
LinearBooleanConstraint.Builder |
setCoefficients(int index,
long value)
repeated int64 coefficients = 2; |
LinearBooleanConstraint.Builder |
setLiterals(int index,
int value)
Linear terms involved in this constraint.
|
LinearBooleanConstraint.Builder |
setLowerBound(long value)
Optional lower (resp.
|
LinearBooleanConstraint.Builder |
setName(java.lang.String value)
The name of this constraint.
|
LinearBooleanConstraint.Builder |
setNameBytes(com.google.protobuf.ByteString value)
The name of this constraint.
|
LinearBooleanConstraint.Builder |
setUpperBound(long value)
optional int64 upper_bound = 4; |
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<LinearBooleanConstraint.Builder>public LinearBooleanConstraint.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessage.Builder<LinearBooleanConstraint.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<LinearBooleanConstraint.Builder>public LinearBooleanConstraint getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic LinearBooleanConstraint build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic LinearBooleanConstraint buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic LinearBooleanConstraint.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<LinearBooleanConstraint.Builder>public LinearBooleanConstraint.Builder mergeFrom(LinearBooleanConstraint other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessage.Builder<LinearBooleanConstraint.Builder>public LinearBooleanConstraint.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<LinearBooleanConstraint.Builder>java.io.IOExceptionpublic java.util.List<java.lang.Integer> getLiteralsList()
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;getLiteralsList in interface LinearBooleanConstraintOrBuilderpublic int getLiteralsCount()
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;getLiteralsCount in interface LinearBooleanConstraintOrBuilderpublic int getLiterals(int index)
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. Note that the same variable shouldn't appear twice and that zero coefficients are not allowed.
repeated int32 literals = 1;getLiterals in interface LinearBooleanConstraintOrBuilderindex - The index of the element to return.public LinearBooleanConstraint.Builder setLiterals(int index, int value)
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. 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 LinearBooleanConstraint.Builder addLiterals(int value)
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. 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 LinearBooleanConstraint.Builder addAllLiterals(java.lang.Iterable<? extends java.lang.Integer> values)
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. 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 LinearBooleanConstraint.Builder clearLiterals()
Linear terms involved in this constraint. literals[i] is the signed representation of the i-th literal of the constraint and coefficients[i] its coefficients. The signed representation is as follow: for a 0-based variable index x, (x + 1) represents the variable x and -(x + 1) represents its negation. 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 LinearBooleanConstraintOrBuilderpublic int getCoefficientsCount()
repeated int64 coefficients = 2;getCoefficientsCount in interface LinearBooleanConstraintOrBuilderpublic long getCoefficients(int index)
repeated int64 coefficients = 2;getCoefficients in interface LinearBooleanConstraintOrBuilderindex - The index of the element to return.public LinearBooleanConstraint.Builder setCoefficients(int index, long value)
repeated int64 coefficients = 2;index - The index to set the value at.value - The coefficients to set.public LinearBooleanConstraint.Builder addCoefficients(long value)
repeated int64 coefficients = 2;value - The coefficients to add.public LinearBooleanConstraint.Builder addAllCoefficients(java.lang.Iterable<? extends java.lang.Long> values)
repeated int64 coefficients = 2;values - The coefficients to add.public LinearBooleanConstraint.Builder clearCoefficients()
repeated int64 coefficients = 2;public boolean hasLowerBound()
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is not bounded in this direction. The bounds are INCLUSIVE.
optional int64 lower_bound = 3;hasLowerBound in interface LinearBooleanConstraintOrBuilderpublic long getLowerBound()
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is not bounded in this direction. The bounds are INCLUSIVE.
optional int64 lower_bound = 3;getLowerBound in interface LinearBooleanConstraintOrBuilderpublic LinearBooleanConstraint.Builder setLowerBound(long value)
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is not bounded in this direction. The bounds are INCLUSIVE.
optional int64 lower_bound = 3;value - The lowerBound to set.public LinearBooleanConstraint.Builder clearLowerBound()
Optional lower (resp. upper) bound of the constraint. If not present, it means that the constraint is not bounded in this direction. The bounds are INCLUSIVE.
optional int64 lower_bound = 3;public boolean hasUpperBound()
optional int64 upper_bound = 4;hasUpperBound in interface LinearBooleanConstraintOrBuilderpublic long getUpperBound()
optional int64 upper_bound = 4;getUpperBound in interface LinearBooleanConstraintOrBuilderpublic LinearBooleanConstraint.Builder setUpperBound(long value)
optional int64 upper_bound = 4;value - The upperBound to set.public LinearBooleanConstraint.Builder clearUpperBound()
optional int64 upper_bound = 4;public boolean hasName()
The name of this constraint.
optional string name = 5 [default = ""];hasName in interface LinearBooleanConstraintOrBuilderpublic java.lang.String getName()
The name of this constraint.
optional string name = 5 [default = ""];getName in interface LinearBooleanConstraintOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The name of this constraint.
optional string name = 5 [default = ""];getNameBytes in interface LinearBooleanConstraintOrBuilderpublic LinearBooleanConstraint.Builder setName(java.lang.String value)
The name of this constraint.
optional string name = 5 [default = ""];value - The name to set.public LinearBooleanConstraint.Builder clearName()
The name of this constraint.
optional string name = 5 [default = ""];public LinearBooleanConstraint.Builder setNameBytes(com.google.protobuf.ByteString value)
The name of this constraint.
optional string name = 5 [default = ""];value - The bytes for name to set.Copyright © 2024. All rights reserved.