Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class CastConstraint
Note: This documentation is automatically generated.
Cast constraints are special channeling constraints designed
to keep a variable in sync with an expression. They are
created internally when Var() is called on a subclass of IntExpr.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["Cast constraints synchronize a variable with an expression, ensuring their values remain consistent."],["They are automatically generated when using `Var()` on an `IntExpr` subclass."],["`CastConstraint` objects provide access to the target variable through the `target_var` method."]]],["Cast constraints synchronize a variable with an expression, created internally when `Var()` is called on an `IntExpr` subclass. The `CastConstraint` class has a constructor taking a `Solver` pointer and a `target_var` `IntVar` pointer. It also has a destructor `~CastConstraint` and a `target_var` method, which returns an `IntVar` pointer representing the target variable being synchronized. This constraint is part of the C++ OR-Tools library.\n"]]