C++ Reference: class CpModelMapping
Note: This documentation is automatically generated.
Holds the mapping between CpModel proto indices and the sat::model ones.This also holds some information used when loading a CpModel proto.
Method | |
---|---|
Affine | Return type: Arguments: TODO(user): We could "easily" create an intermediate variable for more complex linear expression. We could also identify duplicate expressions to not create two identical integer variable. |
Affines | Return type: Arguments: |
ConstraintIsAlreadyLoaded | Return type: Arguments: Depending on the option, we will load constraints in stages. This is used to detect constraints that are already loaded. For instance the interval constraints and the linear constraint of size 1 (encodings) are usually loaded first. |
GetExprFromProto | Return type: Arguments: |
GetProtoVariableFromBooleanVariable | Return type: Arguments: Note that both these functions returns positive reference or -1. |
GetProtoVariableFromIntegerVariable | Return type: Arguments: |
GetVariableMapping | Return type: |
Integer | Return type: Arguments: |
Integers | Return type: Arguments: |
Interval | Return type: Arguments: |
Intervals | Return type: Arguments: |
IsBoolean | Return type: Arguments: Returns true if the given CpModelProto variable reference refers to a Boolean variable. Such variable will always have an associated Literal(), but not always an associated Integer(). |
IsHalfEncodingConstraint | Return type: Arguments: Returns true if the given constraint is a "half-encoding" constraint. That is, if it is of the form (b => size 1 linear) but there is no (<=) side in the model. Such constraint are detected while we extract integer encoding and are cached here so that we can deal properly with them during the linear relaxation. |
IsInteger | Return type: Arguments: |
Literal | Return type: Arguments: |
Literals | Return type: Arguments: |
NumBooleanVariables | Return type: |
NumIntegerVariables | Return type: For logging only, these are not super efficient. |
NumProtoVariables | Return type: Returns the number of variables in the loaded proto. |
PotentialEncodedValues | Return type: Arguments: Returns a heuristic set of values that could be created for the given variable when the constraints will be loaded. Note that the pointer is not stable across calls. It returns nullptr if the set is empty. |