36#ifndef __GECODE_INT_BOOL_HH__
37#define __GECODE_INT_BOOL_HH__
46namespace Gecode {
namespace Int {
namespace Bool {
54 template<
class BVA,
class BVB>
76 template<
class BVA,
class BVB,
class BVC>
89 BVA b0, BVB b1, BVC b2);
104 template<
class BVA,
class BVB>
110 Eq(
Home home, BVA b0, BVB b1);
164 Lq(
Home home, BV b0, BV b1);
236 template<
class BVA,
class BVB>
277 BV b0, BV b1, BV b2);
310 BV b0, BV b1, BV b2, BV b3);
327 template<
class BVA,
class BVB,
class BVC>
334 Or(
Home home, BVA b0, BVB b1, BVC b2);
354 template<
class VX,
class VY>
425 template<
class BVA,
class BVB,
class BVC>
434 Eqv(
Home home, BVA b0 ,BVB b1, BVC b2);
491 template<
class VX,
class VY>
545 template<
class VX,
class VY>
579 template<
class V0,
class V1,
class V2, PropCond pc>
605 template<
class V0,
class V1,
class V2>
631 template<
class V0,
class V1,
class V2>
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int p
Number of positive literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Base-class for both propagators and branchers.
Generic domain change information to be supplied to advisors.
Home class for posting propagators
Boolean view for Boolean variables.
Binary Boolean disjunction propagator (true)
BinOrTrue(Home home, BVA b0, BVB b1)
Constructor for posting.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, BVA b0, BVB b1)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Base-class for binary Boolean propagators.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual void reschedule(Space &home)
Schedule function.
BVB x1
Boolean view Constructor for posting.
BoolBinary(Home home, BVA b0, BVB b1)
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Base-class for ternary Boolean propagators.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
BoolTernary(Home home, BVA b0, BVB b1, BVC b2)
BVC x2
Boolean view Constructor for posting.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual void reschedule(Space &home)
Schedule function.
Boolean clause propagator (disjunctive, true)
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
ClauseTrue(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
ViewArray< VX > x
Views not yet subscribed to.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ViewArray< VY > y
Views not yet subscribed to (origin from negative variables)
Advisors for views (tagged whether for x or y)
Tagged(Space &home, Propagator &p, Council< Tagged > &c, bool x)
Create tagged advisor.
const bool x
Whether advises a view for x or y.
Boolean clause propagator (disjunctive)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Post propagator .
ViewArray< VX > x
Positive views.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
virtual void reschedule(Space &home)
Schedule function.
int n_zero
The number of views assigned to zero in x and y.
Clause(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Constructor for posting.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Council< Tagged > c
The advisor council.
ViewArray< VY > y
Positive views (origin from negative variables)
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
void cancel(Space &home)
Cancel subscriptions.
Boolean equality propagator.
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
Eq(Home home, BVA b0, BVB b1)
Constructor for posting.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Boolean equivalence propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator (equivalence)
Eqv(Space &home, Eqv &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
If-then-else propagator base-class.
IteBase(Space &home, IteBase &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
BoolView b
View for condition.
virtual void reschedule(Space &home)
Schedule function.
If-then-else bounds-consistent propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
IteBnd(Space &home, IteBnd &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
If-then-else domain-consistent propagator.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high ternary)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
IteDom(Space &home, IteDom &p)
Constructor for cloning p.
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Boolean less or equal propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Lq(Home home, BV b0, BV b1)
Constructor for posting.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
n-ary Boolean equality propagator
static ExecStatus post(Home home, ViewArray< BV > &x)
Post propagator .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
NaryEq(Home home, ViewArray< BV > &x)
Constructor for posting.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Boolean n-ary equivalence propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
void resubscribe(Space &home, BoolView &x0)
Update subscription.
NaryEqv(Home home, ViewArray< BoolView > &x, int pm2)
Constructor for posting.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
virtual Actor * copy(Space &home)
Copy propagator during cloning.
int pm2
Parity information mod 2.
ViewArray< BoolView > x
Views not yet subscribed to.
static ExecStatus post(Home home, ViewArray< BoolView > &x, int pm2)
Post propagator .
Nary Boolean less or equal propagator.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
int n_one
The number of views assigned to one in x.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
static ExecStatus post(Home home, ViewArray< VX > &x)
Post propagator .
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
int n_zero
The number of views assigned to zero in x.
bool run
Whether the propagator is currently running.
Council< Advisor > c
The advisor council.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Boolean n-ary disjunction propagator (true)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ExecStatus resubscribe(Space &home, BV &x0, BV x1)
Update subscription.
static ExecStatus post(Home home, ViewArray< BV > &b)
Post propagator .
ViewArray< BV > x
Views not yet subscribed to.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
NaryOrTrue(Home home, ViewArray< BV > &x)
Constructor for posting.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Boolean n-ary disjunction propagator.
virtual void reschedule(Space &home)
Schedule function.
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
NaryOr(Home home, ViewArray< VX > &x, VY y)
Constructor for posting.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
int n_zero
The number of views assigned to zero in x.
Council< Advisor > c
The advisor council.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y)
Post propagator .
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Boolean disjunction propagator.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator .
Or(Home home, BVA b0, BVB b1, BVC b2)
Constructor for posting.
Quarternary Boolean disjunction propagator (true)
QuadOrTrue(Home home, BV b0, BV b1, BV b2, BV b3)
Constructor for posting.
BV x2
Boolean view without subscription.
BV x3
Boolean view without subscription.
static ExecStatus post(Home home, BV b0, BV b1, BV b2, BV b3)
Post propagator .
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Ternary Boolean disjunction propagator (true)
TerOrTrue(Home home, BV b0, BV b1, BV b2)
Constructor for posting.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
BV x2
Boolean view without subscription.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static ExecStatus post(Home home, BV b0, BV b1, BV b2)
Post propagator .
Mixed (n+1)-ary propagator.
Base-class for propagators.
ModEventDelta med
A set of modification events (used during propagation)
#define GECODE_INT_EXPORT
int ModEventDelta
Modification event deltas.
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience)
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Gecode toplevel namespace