Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class SavedVariable
Note: This documentation is automatically generated.
Same as SavedLiteral for variable.
TODO(user): get rid of this, we don't have the notion of equivalent variable
anymore, but the more general affine relation one. We just need to support
general affine for the linear1 involving an absolute value.
[[["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."],[[["\u003cp\u003eThis C++ documentation is for the \u003ccode\u003eSavedVariable\u003c/code\u003e class, which is automatically generated.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSavedVariable\u003c/code\u003e is similar to \u003ccode\u003eSavedLiteral\u003c/code\u003e, but the concept of equivalent variables is being replaced by a more general affine relation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSavedVariable\u003c/code\u003e class includes a constructor that takes an integer \u003ccode\u003eref\u003c/code\u003e argument, and a \u003ccode\u003eGet\u003c/code\u003e method that returns an integer.\u003c/p\u003e\n"],["\u003cp\u003eFuture plans for this class involve supporting general affine relations for linear expressions that include absolute values.\u003c/p\u003e\n"]]],["The `SavedVariable` class in C++ is documented as being similar to `SavedLiteral` for variables, with an upcoming change to support general affine relations instead of just equivalent variables. The documentation outlines two methods: `Get`, which returns an integer, and `SavedVariable`, which takes an integer `ref` as an argument and is declared `explicit`. There is a pending task to replace the notion of \"equivalent variable\" with a more general affine relation approach.\n"],null,["# SavedVariable\n\nC++ Reference: class SavedVariable\n==================================\n\n\nNote: This documentation is automatically generated.\nSame as SavedLiteral for variable. \n\nTODO(user): get rid of this, we don't have the notion of equivalent variable anymore, but the more general affine relation one. We just need to support general affine for the linear1 involving an absolute value.\n\n| Method ||\n|----------------------------------------------------------------------------------------------------|------------------------------------------------------|\n| [`Get`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/presolve_context.h#L75) | Return type: `int ` \u003cbr /\u003e |\n| [`SavedVariable`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/presolve_context.h#L73) | \u003cbr /\u003e |\n| [`SavedVariable`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/presolve_context.h#L74) | Return type: `explicit ` Arguments: `int ref` \u003cbr /\u003e |"]]