[[["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\u003eBooleanXorPropagator\u003c/code\u003e enforces the constraint that the XOR of a given set of literals equals a specific Boolean value.\u003c/p\u003e\n"],["\u003cp\u003ePropagation has a time complexity of O(n) but could be optimized using a two-watcher mechanism.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods for instantiation, constraint propagation (\u003ccode\u003ePropagate\u003c/code\u003e), and registration with a literal watcher (\u003ccode\u003eRegisterWith\u003c/code\u003e).\u003c/p\u003e\n"]]],["`BooleanXorPropagator` propagates that a XOR of literals equals a given value with O(n) complexity. It uses methods like `Propagate` to return a boolean and `RegisterWith` to interact with a `GenericLiteralWatcher`. The constructor `BooleanXorPropagator` takes a vector of literals, a boolean value, a `Trail`, and an `IntegerTrail`. There is a proposed enhancement to implement a two-watcher mechanism to accelerate the propagation.\n"],null,["# BooleanXorPropagator\n\nC++ Reference: class BooleanXorPropagator\n=========================================\n\n\nNote: This documentation is automatically generated.\nPropagate the fact that a XOR of literals is equal to the given value. The complexity is in O(n). \n\nTODO(user): By using a two watcher mechanism, we can propagate this a lot faster.\n\n| Method ||\n|---------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|\n| [`BooleanXorPropagator`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_constraints.h#L42) | \u003cbr /\u003e Arguments: `const std::vector\u003cLiteral\u003e& literals, bool value, Trail* trail, IntegerTrail* integer_trail` \u003cbr /\u003e |\n| [`Propagate`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_constraints.h#L49) | Return type: `bool ` \u003cbr /\u003e |\n| [`RegisterWith`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/cp_constraints.h#L50) | Return type: `void ` Arguments: `GenericLiteralWatcher* watcher` \u003cbr /\u003e |"]]