Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class VariableWithSameReasonIdentifier
Note: This documentation is automatically generated.
Boolean linear constraints can propagate a lot of literals at the same time.
As a result, all these literals will have exactly the same reason. It is
important to take advantage of that during the conflict
computation/minimization. On some problem, this can have a huge impact.
TODO(user): With the new SAME_REASON_AS mechanism, this is more general so
move out of pb_constraint.
Returns the first variable with exactly the same reason as 'var' on which
this function was called since the last Clear(). Note that if no variable
had the same reason, then var is returned.
[[["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."],[[["The `VariableWithSameReasonIdentifier` class helps optimize Boolean linear constraint propagation by grouping literals with the same reason."],["This optimization is crucial as it significantly impacts conflict computation and minimization, leading to performance improvements, especially for complex problems."],["The class provides methods like `Clear`, `FirstVariableWithSameReason`, and `Resize` to manage and utilize the identified literals with the same reason."],["It is recommended to call the `Clear` method before each conflict analysis for optimal results."]]],["The `VariableWithSameReasonIdentifier` class in C++ manages literals with identical reasons, crucial for conflict computation in Boolean linear constraints. Key actions include initializing the class with a `Trail`, clearing a cache via `Clear` before each conflict analysis, and resizing with `Resize`. The `FirstVariableWithSameReason` method identifies the first variable with an identical reason to a given variable, optimizing conflict analysis when many literals share the same reason.\n"]]