public final class LinearBooleanConstraint extends com.google.protobuf.GeneratedMessage 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 | Class and Description |
---|---|
static class |
LinearBooleanConstraint.Builder
A linear Boolean constraint which is a bounded sum of linear terms.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter
Modifier and Type | Field and Description |
---|---|
static int |
COEFFICIENTS_FIELD_NUMBER |
static int |
LITERALS_FIELD_NUMBER |
static int |
LOWER_BOUND_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
UPPER_BOUND_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
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; |
static LinearBooleanConstraint |
getDefaultInstance() |
LinearBooleanConstraint |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
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. upper) bound of the constraint.
|
java.lang.String |
getName()
The name of this constraint.
|
com.google.protobuf.ByteString |
getNameBytes()
The name of this constraint.
|
com.google.protobuf.Parser<LinearBooleanConstraint> |
getParserForType() |
int |
getSerializedSize() |
long |
getUpperBound()
optional int64 upper_bound = 4; |
int |
hashCode() |
boolean |
hasLowerBound()
Optional lower (resp. upper) bound of the constraint.
|
boolean |
hasName()
The name of this constraint.
|
boolean |
hasUpperBound()
optional int64 upper_bound = 4; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static LinearBooleanConstraint.Builder |
newBuilder() |
static LinearBooleanConstraint.Builder |
newBuilder(LinearBooleanConstraint prototype) |
LinearBooleanConstraint.Builder |
newBuilderForType() |
protected LinearBooleanConstraint.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static LinearBooleanConstraint |
parseDelimitedFrom(java.io.InputStream input) |
static LinearBooleanConstraint |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LinearBooleanConstraint |
parseFrom(byte[] data) |
static LinearBooleanConstraint |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LinearBooleanConstraint |
parseFrom(java.nio.ByteBuffer data) |
static LinearBooleanConstraint |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LinearBooleanConstraint |
parseFrom(com.google.protobuf.ByteString data) |
static LinearBooleanConstraint |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LinearBooleanConstraint |
parseFrom(com.google.protobuf.CodedInputStream input) |
static LinearBooleanConstraint |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LinearBooleanConstraint |
parseFrom(java.io.InputStream input) |
static LinearBooleanConstraint |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<LinearBooleanConstraint> |
parser() |
LinearBooleanConstraint.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
findInitializationErrors, getInitializationErrorString, hashFields, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int LITERALS_FIELD_NUMBER
public static final int COEFFICIENTS_FIELD_NUMBER
public static final int LOWER_BOUND_FIELD_NUMBER
public static final int UPPER_BOUND_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessage
public 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 LinearBooleanConstraintOrBuilder
public 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 LinearBooleanConstraintOrBuilder
public 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 LinearBooleanConstraintOrBuilder
index
- The index of the element to return.public java.util.List<java.lang.Long> getCoefficientsList()
repeated int64 coefficients = 2;
getCoefficientsList
in interface LinearBooleanConstraintOrBuilder
public int getCoefficientsCount()
repeated int64 coefficients = 2;
getCoefficientsCount
in interface LinearBooleanConstraintOrBuilder
public long getCoefficients(int index)
repeated int64 coefficients = 2;
getCoefficients
in interface LinearBooleanConstraintOrBuilder
index
- The index of the element to return.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 LinearBooleanConstraintOrBuilder
public 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 LinearBooleanConstraintOrBuilder
public boolean hasUpperBound()
optional int64 upper_bound = 4;
hasUpperBound
in interface LinearBooleanConstraintOrBuilder
public long getUpperBound()
optional int64 upper_bound = 4;
getUpperBound
in interface LinearBooleanConstraintOrBuilder
public boolean hasName()
The name of this constraint.
optional string name = 5 [default = ""];
hasName
in interface LinearBooleanConstraintOrBuilder
public java.lang.String getName()
The name of this constraint.
optional string name = 5 [default = ""];
getName
in interface LinearBooleanConstraintOrBuilder
public com.google.protobuf.ByteString getNameBytes()
The name of this constraint.
optional string name = 5 [default = ""];
getNameBytes
in interface LinearBooleanConstraintOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.GeneratedMessage
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.GeneratedMessage
public boolean equals(java.lang.Object obj)
equals
in interface com.google.protobuf.Message
equals
in class com.google.protobuf.AbstractMessage
public int hashCode()
hashCode
in interface com.google.protobuf.Message
hashCode
in class com.google.protobuf.AbstractMessage
public static LinearBooleanConstraint parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static LinearBooleanConstraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static LinearBooleanConstraint parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static LinearBooleanConstraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static LinearBooleanConstraint parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static LinearBooleanConstraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static LinearBooleanConstraint parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static LinearBooleanConstraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static LinearBooleanConstraint parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static LinearBooleanConstraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static LinearBooleanConstraint parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOException
public static LinearBooleanConstraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public LinearBooleanConstraint.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static LinearBooleanConstraint.Builder newBuilder()
public static LinearBooleanConstraint.Builder newBuilder(LinearBooleanConstraint prototype)
public LinearBooleanConstraint.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected LinearBooleanConstraint.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.AbstractMessage
public static LinearBooleanConstraint getDefaultInstance()
public static com.google.protobuf.Parser<LinearBooleanConstraint> parser()
public com.google.protobuf.Parser<LinearBooleanConstraint> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public LinearBooleanConstraint getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
Copyright © 2025. All rights reserved.