38 namespace Gecode {
namespace Int {
namespace Count {
40 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
43 :
ViewBase<VX,VY,VZ>(home,x,y,z,c) {}
45 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
50 if (
isval(y) && z.assigned())
59 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
63 :
ViewBase<VX,VY,VZ>(home,share,p) {}
65 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
71 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
ExecStatus ES_SUBSUMED(Propagator &p)
VZ z
View which yields result of counting.
static bool sharing(const ViewArray< VX > &x, const VY &y, const VZ &z)
Test whether there is sharing of z with x or y.
Base-class for count propagators (view)
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
bool isval(VY y)
Return whether y is a value.
Propagation has computed fixpoint.
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
Base-class for both propagators and branchers.
Propagator for counting views (greater or equal to number of equal views)
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
ViewArray< VX > x
Views still to count.
int c
Number of views which are equal and have been eliminated.
void count(Space &home)
Count how many views are equal now.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
Propagator for counting views (greater or equal integer to number of equal views) ...
ModEventDelta modeventdelta(void) const
Return the modification event delta.
Post propagator for SetVar SetOpType SetVar y
Post propagator for SetVar x
Propagation has not computed fixpoint.
int atmost(void) const
How many views are at most equal.
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
int size(void) const
Return size of array (number of elements)
Home class for posting propagators
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
GqView(Space &home, bool share, GqView &p)
Constructor for cloning p.
ExecStatus post_true(Home home, VX x, ConstIntView y)