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