Package com.google.ortools.sat
Class LinearBooleanProblem.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
- com.google.ortools.sat.LinearBooleanProblem.Builder
-
- All Implemented Interfaces:
LinearBooleanProblemOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,java.lang.Cloneable
- Enclosing class:
- LinearBooleanProblem
public static final class LinearBooleanProblem.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder> implements LinearBooleanProblemOrBuilder
A linear Boolean problem.
Protobuf typeoperations_research.sat.LinearBooleanProblem
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LinearBooleanProblem.BuilderaddAllConstraints(java.lang.Iterable<? extends LinearBooleanConstraint> values)The constraints of the problem.LinearBooleanProblem.BuilderaddAllVarNames(java.lang.Iterable<java.lang.String> values)The names of the problem variables.LinearBooleanProblem.BuilderaddConstraints(int index, LinearBooleanConstraint value)The constraints of the problem.LinearBooleanProblem.BuilderaddConstraints(int index, LinearBooleanConstraint.Builder builderForValue)The constraints of the problem.LinearBooleanProblem.BuilderaddConstraints(LinearBooleanConstraint value)The constraints of the problem.LinearBooleanProblem.BuilderaddConstraints(LinearBooleanConstraint.Builder builderForValue)The constraints of the problem.LinearBooleanConstraint.BuilderaddConstraintsBuilder()The constraints of the problem.LinearBooleanConstraint.BuilderaddConstraintsBuilder(int index)The constraints of the problem.LinearBooleanProblem.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)LinearBooleanProblem.BuilderaddVarNames(java.lang.String value)The names of the problem variables.LinearBooleanProblem.BuilderaddVarNamesBytes(com.google.protobuf.ByteString value)The names of the problem variables.LinearBooleanProblembuild()LinearBooleanProblembuildPartial()LinearBooleanProblem.Builderclear()LinearBooleanProblem.BuilderclearAssignment()Stores an assignment of the problem variables.LinearBooleanProblem.BuilderclearConstraints()The constraints of the problem.LinearBooleanProblem.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)LinearBooleanProblem.BuilderclearName()The name of the problem.LinearBooleanProblem.BuilderclearNumVariables()The number of variables in the problem.LinearBooleanProblem.BuilderclearObjective()The objective of the problem.LinearBooleanProblem.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)LinearBooleanProblem.BuilderclearOriginalNumVariables()Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created.LinearBooleanProblem.BuilderclearVarNames()The names of the problem variables.LinearBooleanProblem.Builderclone()BooleanAssignmentgetAssignment()Stores an assignment of the problem variables.BooleanAssignment.BuildergetAssignmentBuilder()Stores an assignment of the problem variables.BooleanAssignmentOrBuildergetAssignmentOrBuilder()Stores an assignment of the problem variables.LinearBooleanConstraintgetConstraints(int index)The constraints of the problem.LinearBooleanConstraint.BuildergetConstraintsBuilder(int index)The constraints of the problem.java.util.List<LinearBooleanConstraint.Builder>getConstraintsBuilderList()The constraints of the problem.intgetConstraintsCount()The constraints of the problem.java.util.List<LinearBooleanConstraint>getConstraintsList()The constraints of the problem.LinearBooleanConstraintOrBuildergetConstraintsOrBuilder(int index)The constraints of the problem.java.util.List<? extends LinearBooleanConstraintOrBuilder>getConstraintsOrBuilderList()The constraints of the problem.LinearBooleanProblemgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()java.lang.StringgetName()The name of the problem.com.google.protobuf.ByteStringgetNameBytes()The name of the problem.intgetNumVariables()The number of variables in the problem.LinearObjectivegetObjective()The objective of the problem.LinearObjective.BuildergetObjectiveBuilder()The objective of the problem.LinearObjectiveOrBuildergetObjectiveOrBuilder()The objective of the problem.intgetOriginalNumVariables()Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created.java.lang.StringgetVarNames(int index)The names of the problem variables.com.google.protobuf.ByteStringgetVarNamesBytes(int index)The names of the problem variables.intgetVarNamesCount()The names of the problem variables.com.google.protobuf.ProtocolStringListgetVarNamesList()The names of the problem variables.booleanhasAssignment()Stores an assignment of the problem variables.booleanhasName()The name of the problem.booleanhasNumVariables()The number of variables in the problem.booleanhasObjective()The objective of the problem.booleanhasOriginalNumVariables()Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()LinearBooleanProblem.BuildermergeAssignment(BooleanAssignment value)Stores an assignment of the problem variables.LinearBooleanProblem.BuildermergeFrom(LinearBooleanProblem other)LinearBooleanProblem.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)LinearBooleanProblem.BuildermergeFrom(com.google.protobuf.Message other)LinearBooleanProblem.BuildermergeObjective(LinearObjective value)The objective of the problem.LinearBooleanProblem.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)LinearBooleanProblem.BuilderremoveConstraints(int index)The constraints of the problem.LinearBooleanProblem.BuildersetAssignment(BooleanAssignment value)Stores an assignment of the problem variables.LinearBooleanProblem.BuildersetAssignment(BooleanAssignment.Builder builderForValue)Stores an assignment of the problem variables.LinearBooleanProblem.BuildersetConstraints(int index, LinearBooleanConstraint value)The constraints of the problem.LinearBooleanProblem.BuildersetConstraints(int index, LinearBooleanConstraint.Builder builderForValue)The constraints of the problem.LinearBooleanProblem.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)LinearBooleanProblem.BuildersetName(java.lang.String value)The name of the problem.LinearBooleanProblem.BuildersetNameBytes(com.google.protobuf.ByteString value)The name of the problem.LinearBooleanProblem.BuildersetNumVariables(int value)The number of variables in the problem.LinearBooleanProblem.BuildersetObjective(LinearObjective value)The objective of the problem.LinearBooleanProblem.BuildersetObjective(LinearObjective.Builder builderForValue)The objective of the problem.LinearBooleanProblem.BuildersetOriginalNumVariables(int value)Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created.LinearBooleanProblem.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)LinearBooleanProblem.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)LinearBooleanProblem.BuildersetVarNames(int index, java.lang.String value)The names of the problem variables.-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
clear
public LinearBooleanProblem.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
getDefaultInstanceForType
public LinearBooleanProblem getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public LinearBooleanProblem build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public LinearBooleanProblem buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public LinearBooleanProblem.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
setField
public LinearBooleanProblem.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
clearField
public LinearBooleanProblem.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
clearOneof
public LinearBooleanProblem.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
setRepeatedField
public LinearBooleanProblem.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
addRepeatedField
public LinearBooleanProblem.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
mergeFrom
public LinearBooleanProblem.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LinearBooleanProblem.Builder>
-
mergeFrom
public LinearBooleanProblem.Builder mergeFrom(LinearBooleanProblem other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
mergeFrom
public LinearBooleanProblem.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LinearBooleanProblem.Builder>- Throws:
java.io.IOException
-
hasName
public boolean hasName()
The name of the problem.
optional string name = 1 [default = ""];- Specified by:
hasNamein interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the name field is set.
-
getName
public java.lang.String getName()
The name of the problem.
optional string name = 1 [default = ""];- Specified by:
getNamein interfaceLinearBooleanProblemOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
The name of the problem.
optional string name = 1 [default = ""];- Specified by:
getNameBytesin interfaceLinearBooleanProblemOrBuilder- Returns:
- The bytes for name.
-
setName
public LinearBooleanProblem.Builder setName(java.lang.String value)
The name of the problem.
optional string name = 1 [default = ""];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
public LinearBooleanProblem.Builder clearName()
The name of the problem.
optional string name = 1 [default = ""];- Returns:
- This builder for chaining.
-
setNameBytes
public LinearBooleanProblem.Builder setNameBytes(com.google.protobuf.ByteString value)
The name of the problem.
optional string name = 1 [default = ""];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
hasNumVariables
public boolean hasNumVariables()
The number of variables in the problem. All the signed representation of the problem literals must be in [-num_variables, num_variables], excluding 0.
optional int32 num_variables = 3;- Specified by:
hasNumVariablesin interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the numVariables field is set.
-
getNumVariables
public int getNumVariables()
The number of variables in the problem. All the signed representation of the problem literals must be in [-num_variables, num_variables], excluding 0.
optional int32 num_variables = 3;- Specified by:
getNumVariablesin interfaceLinearBooleanProblemOrBuilder- Returns:
- The numVariables.
-
setNumVariables
public LinearBooleanProblem.Builder setNumVariables(int value)
The number of variables in the problem. All the signed representation of the problem literals must be in [-num_variables, num_variables], excluding 0.
optional int32 num_variables = 3;- Parameters:
value- The numVariables to set.- Returns:
- This builder for chaining.
-
clearNumVariables
public LinearBooleanProblem.Builder clearNumVariables()
The number of variables in the problem. All the signed representation of the problem literals must be in [-num_variables, num_variables], excluding 0.
optional int32 num_variables = 3;- Returns:
- This builder for chaining.
-
getConstraintsList
public java.util.List<LinearBooleanConstraint> getConstraintsList()
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsListin interfaceLinearBooleanProblemOrBuilder
-
getConstraintsCount
public int getConstraintsCount()
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsCountin interfaceLinearBooleanProblemOrBuilder
-
getConstraints
public LinearBooleanConstraint getConstraints(int index)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsin interfaceLinearBooleanProblemOrBuilder
-
setConstraints
public LinearBooleanProblem.Builder setConstraints(int index, LinearBooleanConstraint value)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
setConstraints
public LinearBooleanProblem.Builder setConstraints(int index, LinearBooleanConstraint.Builder builderForValue)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
addConstraints
public LinearBooleanProblem.Builder addConstraints(LinearBooleanConstraint value)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
addConstraints
public LinearBooleanProblem.Builder addConstraints(int index, LinearBooleanConstraint value)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
addConstraints
public LinearBooleanProblem.Builder addConstraints(LinearBooleanConstraint.Builder builderForValue)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
addConstraints
public LinearBooleanProblem.Builder addConstraints(int index, LinearBooleanConstraint.Builder builderForValue)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
addAllConstraints
public LinearBooleanProblem.Builder addAllConstraints(java.lang.Iterable<? extends LinearBooleanConstraint> values)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
clearConstraints
public LinearBooleanProblem.Builder clearConstraints()
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
removeConstraints
public LinearBooleanProblem.Builder removeConstraints(int index)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
getConstraintsBuilder
public LinearBooleanConstraint.Builder getConstraintsBuilder(int index)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
getConstraintsOrBuilder
public LinearBooleanConstraintOrBuilder getConstraintsOrBuilder(int index)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsOrBuilderin interfaceLinearBooleanProblemOrBuilder
-
getConstraintsOrBuilderList
public java.util.List<? extends LinearBooleanConstraintOrBuilder> getConstraintsOrBuilderList()
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;- Specified by:
getConstraintsOrBuilderListin interfaceLinearBooleanProblemOrBuilder
-
addConstraintsBuilder
public LinearBooleanConstraint.Builder addConstraintsBuilder()
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
addConstraintsBuilder
public LinearBooleanConstraint.Builder addConstraintsBuilder(int index)
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
getConstraintsBuilderList
public java.util.List<LinearBooleanConstraint.Builder> getConstraintsBuilderList()
The constraints of the problem.
repeated .operations_research.sat.LinearBooleanConstraint constraints = 4;
-
hasObjective
public boolean hasObjective()
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;- Specified by:
hasObjectivein interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the objective field is set.
-
getObjective
public LinearObjective getObjective()
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;- Specified by:
getObjectivein interfaceLinearBooleanProblemOrBuilder- Returns:
- The objective.
-
setObjective
public LinearBooleanProblem.Builder setObjective(LinearObjective value)
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;
-
setObjective
public LinearBooleanProblem.Builder setObjective(LinearObjective.Builder builderForValue)
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;
-
mergeObjective
public LinearBooleanProblem.Builder mergeObjective(LinearObjective value)
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;
-
clearObjective
public LinearBooleanProblem.Builder clearObjective()
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;
-
getObjectiveBuilder
public LinearObjective.Builder getObjectiveBuilder()
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;
-
getObjectiveOrBuilder
public LinearObjectiveOrBuilder getObjectiveOrBuilder()
The objective of the problem. If left empty, we just have a satisfiability problem.
optional .operations_research.sat.LinearObjective objective = 5;- Specified by:
getObjectiveOrBuilderin interfaceLinearBooleanProblemOrBuilder
-
getVarNamesList
public com.google.protobuf.ProtocolStringList getVarNamesList()
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Specified by:
getVarNamesListin interfaceLinearBooleanProblemOrBuilder- Returns:
- A list containing the varNames.
-
getVarNamesCount
public int getVarNamesCount()
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Specified by:
getVarNamesCountin interfaceLinearBooleanProblemOrBuilder- Returns:
- The count of varNames.
-
getVarNames
public java.lang.String getVarNames(int index)
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Specified by:
getVarNamesin interfaceLinearBooleanProblemOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The varNames at the given index.
-
getVarNamesBytes
public com.google.protobuf.ByteString getVarNamesBytes(int index)
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Specified by:
getVarNamesBytesin interfaceLinearBooleanProblemOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the varNames at the given index.
-
setVarNames
public LinearBooleanProblem.Builder setVarNames(int index, java.lang.String value)
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Parameters:
index- The index to set the value at.value- The varNames to set.- Returns:
- This builder for chaining.
-
addVarNames
public LinearBooleanProblem.Builder addVarNames(java.lang.String value)
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Parameters:
value- The varNames to add.- Returns:
- This builder for chaining.
-
addAllVarNames
public LinearBooleanProblem.Builder addAllVarNames(java.lang.Iterable<java.lang.String> values)
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Parameters:
values- The varNames to add.- Returns:
- This builder for chaining.
-
clearVarNames
public LinearBooleanProblem.Builder clearVarNames()
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Returns:
- This builder for chaining.
-
addVarNamesBytes
public LinearBooleanProblem.Builder addVarNamesBytes(com.google.protobuf.ByteString value)
The names of the problem variables. The variables index are 0-based and var_names[i] will be the name of the i-th variable which correspond to literals +(i + 1) or -(i + 1). This is optional and can be left empty.
repeated string var_names = 6;- Parameters:
value- The bytes of the varNames to add.- Returns:
- This builder for chaining.
-
hasAssignment
public boolean hasAssignment()
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;- Specified by:
hasAssignmentin interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the assignment field is set.
-
getAssignment
public BooleanAssignment getAssignment()
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;- Specified by:
getAssignmentin interfaceLinearBooleanProblemOrBuilder- Returns:
- The assignment.
-
setAssignment
public LinearBooleanProblem.Builder setAssignment(BooleanAssignment value)
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;
-
setAssignment
public LinearBooleanProblem.Builder setAssignment(BooleanAssignment.Builder builderForValue)
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;
-
mergeAssignment
public LinearBooleanProblem.Builder mergeAssignment(BooleanAssignment value)
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;
-
clearAssignment
public LinearBooleanProblem.Builder clearAssignment()
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;
-
getAssignmentBuilder
public BooleanAssignment.Builder getAssignmentBuilder()
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;
-
getAssignmentOrBuilder
public BooleanAssignmentOrBuilder getAssignmentOrBuilder()
Stores an assignment of the problem variables. That may be an initial feasible solution, just a partial assignment or the optimal solution.
optional .operations_research.sat.BooleanAssignment assignment = 7;- Specified by:
getAssignmentOrBuilderin interfaceLinearBooleanProblemOrBuilder
-
hasOriginalNumVariables
public boolean hasOriginalNumVariables()
Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created. This stores the number of variables in the original problem (which are in one to one correspondence with the first variables of this problem).
optional int32 original_num_variables = 8;- Specified by:
hasOriginalNumVariablesin interfaceLinearBooleanProblemOrBuilder- Returns:
- Whether the originalNumVariables field is set.
-
getOriginalNumVariables
public int getOriginalNumVariables()
Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created. This stores the number of variables in the original problem (which are in one to one correspondence with the first variables of this problem).
optional int32 original_num_variables = 8;- Specified by:
getOriginalNumVariablesin interfaceLinearBooleanProblemOrBuilder- Returns:
- The originalNumVariables.
-
setOriginalNumVariables
public LinearBooleanProblem.Builder setOriginalNumVariables(int value)
Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created. This stores the number of variables in the original problem (which are in one to one correspondence with the first variables of this problem).
optional int32 original_num_variables = 8;- Parameters:
value- The originalNumVariables to set.- Returns:
- This builder for chaining.
-
clearOriginalNumVariables
public LinearBooleanProblem.Builder clearOriginalNumVariables()
Hack: When converting a wcnf formulat to a LinearBooleanProblem, extra variables need to be created. This stores the number of variables in the original problem (which are in one to one correspondence with the first variables of this problem).
optional int32 original_num_variables = 8;- Returns:
- This builder for chaining.
-
setUnknownFields
public final LinearBooleanProblem.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
mergeUnknownFields
public final LinearBooleanProblem.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<LinearBooleanProblem.Builder>
-
-