36 template<
class VX,
class VY>
41 template<
class VX,
class VY>
46 for (
int i=n_x; i--; )
49 x[i] =
x[--n_x];
break;
51 x[i] =
x[--n_x];
c--;
break;
59 if ((
c < 0) || (
c > n_x))
68 int n_s = std::max(
c,n_x-
c)+1;
74 template<
class VX,
class VY>
79 template<
class VX,
class VY>
85 template<
class VX,
class VY>
90 for (
int i=
n_s; i--; )
106 if ((
c < 0) || (
c > n_x))
109 for (
int i=n_x; i-- >
n_s; )
117 if ((
c < 0) || (
c > n_x))
129 int m = std::max(
c,n_x-
c)+1;
Base-class for both propagators and branchers.
Home class for posting propagators
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home)
Create copy during cloning.
EqInt(Space &home, EqInt &p)
Constructor for cloning p.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
IntBase(Space &home, IntBase &p)
Constructor for cloning p.
int n_s
Views from x[0] ... x[n_s-1] have subscriptions.
ViewArray< VX > x
Views still to count.
int c
Number of views which are equal and have been eliminated.
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
ExecStatus post_false(Home home, ViewArray< VX > &x, VX y)
Post that all views in x are not equal to y.
ExecStatus post_true(Home home, ViewArray< VX > &x, VX y)
Post that all views in x are equal to y.
RelTest holds(VX x, VX y)
Test whether x and y are equal.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
@ RT_TRUE
Relation does hold.
@ RT_MAYBE
Relation may hold or not.
@ RT_FALSE
Relation does not hold.
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
#define GECODE_NEVER
Assert that this command is never executed.