![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Propagate the fact that a XOR of literals is equal to the given value. The complexity is in O(n).
Definition at line 37 of file cp_constraints.h.
#include <cp_constraints.h>
Public Member Functions | |
BooleanXorPropagator (const std::vector< Literal > &literals, bool value, Trail *trail, IntegerTrail *integer_trail) | |
BooleanXorPropagator (const BooleanXorPropagator &)=delete | |
This type is neither copyable nor movable. | |
BooleanXorPropagator & | operator= (const BooleanXorPropagator &)=delete |
bool | Propagate () final |
void | RegisterWith (GenericLiteralWatcher *watcher) |
Public Member Functions inherited from operations_research::sat::PropagatorInterface | |
PropagatorInterface ()=default | |
virtual | ~PropagatorInterface ()=default |
virtual bool | IncrementalPropagate (const std::vector< int > &) |
|
inline |
Definition at line 39 of file cp_constraints.h.
|
delete |
This type is neither copyable nor movable.
|
delete |
|
finalvirtual |
This will be called after one or more literals that are watched by this propagator changed. It will also always be called on the first propagation cycle after registration.
If we have more than one unassigned literal, we can't deduce anything.
Propagates?
Ok.
Conflict.
Implements operations_research::sat::PropagatorInterface.
Definition at line 29 of file cp_constraints.cc.
void operations_research::sat::BooleanXorPropagator::RegisterWith | ( | GenericLiteralWatcher * | watcher | ) |
Definition at line 74 of file cp_constraints.cc.