38 namespace Gecode {
namespace Int {
namespace Count {
40 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
44 :
ViewBase<VX,VY,VZ>(home,x,y,z,c) {}
46 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
61 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
65 :
ViewBase<VX,VY,VZ>(home,share,p) {}
67 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
73 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
93 ::
post(home(*
this),
x,yc,z.val()+
c)));
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
ExecStatus ES_SUBSUMED(Propagator &p)
Base-class for count propagators (view)
void atmost(Home home, const IntVarArgs &x, int n, int m, IntConLevel icl=ICL_DEF)
Post constraint .
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Propagator for counting views (equal to number of equal views)
Propagation has computed fixpoint.
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
void atleast(Home home, const IntVarArgs &x, int n, int m, IntConLevel icl=ICL_DEF)
Post constraint .
Base-class for both propagators and branchers.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Gecode::FloatVal c(-8, 8)
EqView(Space &home, bool share, EqView &p)
Constructor for cloning p.
int p
Number of positive literals for node type.
Propagator for counting views (equal integer to number of equal views)
ViewTypeDesc vtd(VY y)
Return the view type description of y.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
ModEventDelta modeventdelta(void) const
Return the modification event delta.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Node * x
Pointer to corresponding Boolean expression node.
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntConLevel)
Post propagator for .
Propagation has not computed fixpoint.
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace
ExecStatus post_false(Home home, VX x, ConstIntView y)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
ExecStatus post_true(Home home, VX x, ConstIntView y)