Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: cp_model_utils
Note: This documentation is automatically generated.
Function |
Type |
Arguments |
Comments |
AddLinearExpressionToLinearConstraint | Return type: void Arguments: const LinearExpressionProto& expr, int64_t coefficient, LinearConstraintProto* linear |
AllValuesInDomain | Return type: std::vector<int64_t> Arguments: const ProtoWithDomain& proto |
ApplyToAllIntervalIndices | Return type: void Arguments: const std::function<void(int* |
ApplyToAllLiteralIndices | Return type: void Arguments: const std::function<void(int* |
ApplyToAllVariableIndices | Return type: void Arguments: const std::function<void(int* |
ComputeInnerObjective | Return type: int64_t Arguments: const CpObjectiveProto& objective, const CpSolverResponse& response |
ConstraintCaseName | Return type: std::string Arguments: ConstraintProto::ConstraintCase constraint_case |
DomainInProtoContains | Return type: bool Arguments: const ProtoWithDomain& proto, int64_t value |
EnforcementLiteral | Return type: inline int Arguments: const ConstraintProto& ct |
ExpressionContainsSingleRef | Return type: bool Arguments: const LinearExpressionProto& expr |
ExpressionIsAffine | Return type: bool Arguments: const LinearExpressionProto& expr |
FillDomainInProto | Return type: void Arguments: const Domain& domain, ProtoWithDomain* proto |
GetReferencesUsedByConstraint | Return type: IndexReferences Arguments: const ConstraintProto& ct |
GetSingleRefFromExpression | Return type: int Arguments: const LinearExpressionProto& expr |
HasEnforcementLiteral | Return type: inline bool Arguments: const ConstraintProto& ct |
LinearExpressionProtosAreEqual | Return type: bool Arguments: const LinearExpressionProto& a, const LinearExpressionProto& b, int64_t b_scaling = 1 |
NegatedRef | Return type: inline int Arguments: int ref |
PositiveRef | Return type: inline int Arguments: int ref |
ReadDomainFromProto | Return type: Domain Arguments: const ProtoWithDomain& proto |
RefIsPositive | Return type: inline bool Arguments: int ref |
ScaleInnerObjectiveValue | Return type: inline int64_t Arguments: const CpObjectiveProto& proto, int64_t value |
ScaleObjectiveValue | Return type: inline double Arguments: const CpObjectiveProto& proto, int64_t value |
SetToNegatedLinearExpression | Return type: void Arguments: const LinearExpressionProto& input_expr, LinearExpressionProto* output_negated_expr |
UnscaleObjectiveValue | Return type: inline double Arguments: const CpObjectiveProto& proto, double value |
UsedIntervals | Return type: std::vector<int> Arguments: const ConstraintProto& ct |
UsedVariables | Return type: std::vector<int> Arguments: const ConstraintProto& ct |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["This C++ documentation outlines utility functions for managing constraint programming models. Key actions include manipulating linear expressions, such as adding expressions to constraints (`AddLinearExpressionToLinearConstraint`) and negating them (`SetToNegatedLinearExpression`). Other functions handle domains, reading (`ReadDomainFromProto`) and filling them (`FillDomainInProto`), as well as checking for specific values (`DomainInProtoContains`, `AllValuesInDomain`). Objective value scaling (`ScaleObjectiveValue`, `UnscaleObjectiveValue`) and reference management (`NegatedRef`, `PositiveRef`) are also core functions.\n"],null,[]]