Package com.google.ortools.sat
Interface LinearBooleanConstraintOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
LinearBooleanConstraint,LinearBooleanConstraint.Builder
public interface LinearBooleanConstraintOrBuilder 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)Linear terms involved in this constraint.intgetLiteralsCount()Linear terms involved in this constraint.java.util.List<java.lang.Integer>getLiteralsList()Linear terms involved in this constraint.longgetLowerBound()Optional lower (resp.java.lang.StringgetName()The name of this constraint.com.google.protobuf.ByteStringgetNameBytes()The name of this constraint.longgetUpperBound()optional int64 upper_bound = 4;booleanhasLowerBound()Optional lower (resp.booleanhasName()The name of this constraint.booleanhasUpperBound()optional int64 upper_bound = 4;-
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()
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;- Returns:
- A list containing the literals.
-
getLiteralsCount
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;- Returns:
- The count of literals.
-
getLiterals
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;- 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.
-
hasLowerBound
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;- Returns:
- Whether the lowerBound field is set.
-
getLowerBound
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;- Returns:
- The lowerBound.
-
hasUpperBound
boolean hasUpperBound()
optional int64 upper_bound = 4;- Returns:
- Whether the upperBound field is set.
-
getUpperBound
long getUpperBound()
optional int64 upper_bound = 4;- Returns:
- The upperBound.
-
hasName
boolean hasName()
The name of this constraint.
optional string name = 5 [default = ""];- Returns:
- Whether the name field is set.
-
getName
java.lang.String getName()
The name of this constraint.
optional string name = 5 [default = ""];- Returns:
- The name.
-
getNameBytes
com.google.protobuf.ByteString getNameBytes()
The name of this constraint.
optional string name = 5 [default = ""];- Returns:
- The bytes for name.
-
-