34 namespace Gecode {
namespace Int {
namespace Count {
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;
69 template<
class VX,
class VY>
74 template<
class VX,
class VY>
80 template<
class VX,
class VY>
85 for (
int i=n_s;
i--; )
89 x[
i]=
x[--n_s];
x[n_s]=
x[--n_x];
93 x[
i]=
x[--n_s];
x[n_s]=
x[--n_x];
c--;
106 for (
int i=n_x;
i-- > n_s; )
int p
Number of positive literals for node type.
Node * x
Pointer to corresponding Boolean expression node.
Base-class for both propagators and branchers.
Home class for posting propagators
Baseclass for count propagators (integer)
Propagator for counting views (less or equal integer to number of equal views)
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
LqInt(Space &home, LqInt &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Create copy during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_FAILED
Execution has resulted in failure.
Post propagator for SetVar SetOpType SetVar y
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEventDelta
Modification event deltas.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
RelTest holds(VX x, ConstIntView y)
Test whether x and y are equal.
ExecStatus post_false(Home home, VX x, ConstIntView y)
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::FloatVal c(-8, 8)
Gecode::IntArgs i({1, 2, 3, 4})
#define GECODE_NEVER
Assert that this command is never executed.