[[["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\u003eThe \u003ccode\u003eSquarePropagator\u003c/code\u003e class in C++ enforces the constraint x * x = s within the constraint programming solver.\u003c/p\u003e\n"],["\u003cp\u003eIt currently works under the assumption that x is non-negative and utilizes propagation to maintain this constraint.\u003c/p\u003e\n"],["\u003cp\u003eCore methods include \u003ccode\u003ePropagate\u003c/code\u003e for constraint enforcement, \u003ccode\u003eRegisterWith\u003c/code\u003e for integration with the solver's watching mechanism, and the constructor \u003ccode\u003eSquarePropagator\u003c/code\u003e to initialize the constraint with the involved expressions and the integer trail.\u003c/p\u003e\n"]]],["The `SquarePropagator` class in C++ propagates the constraint `x * x = s`, specifically for nonnegative `x`. It has a constructor `SquarePropagator` that takes affine expressions `x` and `s`, and an `IntegerTrail`. The class provides a `Propagate` method, which returns a boolean, and a `RegisterWith` method, which registers a `GenericLiteralWatcher`. These methods are used to manage and enforce the square constraint.\n"],null,["# SquarePropagator\n\nC++ Reference: class SquarePropagator\n=====================================\n\n\nNote: This documentation is automatically generated.\nPropagates x \\* x = s. TODO(user): Only works for x nonnegative.\n\n| Method ||\n|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|\n| [`Propagate`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/integer_expr.h#L354) | Return type: `bool ` \u003cbr /\u003e |\n| [`RegisterWith`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/integer_expr.h#L355) | Return type: `void ` Arguments: `GenericLiteralWatcher* watcher` \u003cbr /\u003e |\n| [`SquarePropagator`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/integer_expr.h#L351) | \u003cbr /\u003e Arguments: `AffineExpression x, AffineExpression s, IntegerTrail* integer_trail` \u003cbr /\u003e |"]]