Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class DisjunctiveWithTwoItems
Note: This documentation is automatically generated.
This is an optimization for the case when we have a big number of such
pairwise constraints. This should be roughtly equivalent to what the general
disjunctive case is doing, but it dealt with variable size better and has a
lot less overhead.
[[["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\u003e\u003ccode\u003eDisjunctiveWithTwoItems\u003c/code\u003e is an optimization class in C++ for handling a large number of pairwise constraints efficiently.\u003c/p\u003e\n"],["\u003cp\u003eIt offers comparable functionality to the general disjunctive case but with improved variable size handling and reduced overhead.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods like \u003ccode\u003ePropagate\u003c/code\u003e and \u003ccode\u003eRegisterWith\u003c/code\u003e for constraint propagation and integration with a literal watcher.\u003c/p\u003e\n"]]],["The `DisjunctiveWithTwoItems` class in C++ optimizes pairwise constraints, offering improved variable size handling and reduced overhead compared to general disjunctive cases. Key methods include: `DisjunctiveWithTwoItems`, which takes a `SchedulingConstraintHelper` pointer as an argument; `Propagate`, a boolean function; and `RegisterWith`, which accepts a `GenericLiteralWatcher` pointer and returns an integer. This class is designed for scenarios with numerous pairwise constraints, focusing on efficiency and resource management.\n"],null,["C++ Reference: class DisjunctiveWithTwoItems\n\n\nNote: This documentation is automatically generated.\nThis is an optimization for the case when we have a big number of such pairwise constraints. This should be roughtly equivalent to what the general disjunctive case is doing, but it dealt with variable size better and has a lot less overhead.\n\n| Method ||\n|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [`DisjunctiveWithTwoItems`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/disjunctive.h#L300) | Return type: `explicit ` Arguments: `SchedulingConstraintHelper* helper` \u003cbr /\u003e |\n| [`Propagate`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/disjunctive.h#L302) | Return type: `bool ` \u003cbr /\u003e |\n| [`RegisterWith`](https://github.com/google/or-tools/blob/v9.4/ortools/sat/disjunctive.h#L303) | Return type: `int ` Arguments: `GenericLiteralWatcher* watcher` \u003cbr /\u003e |"]]