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.
Method |
Clear | Return type: void Clears the cache. Call this before each conflict analysis.
|
FirstVariableWithSameReason | Return type: BooleanVariable Arguments: BooleanVariable var 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.
|
Resize | Return type: void Arguments: int num_variables |
VariableWithSameReasonIdentifier | Return type: explicit Arguments: const Trail& trail |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["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"],null,[]]