38 namespace Gecode {
namespace Int {
namespace Count {
40 template<
class VX,
class VY,
class VZ,
bool shr>
44 :
ViewBase<VX,VY,VZ>(home,x,y,z,c) {}
46 template<
class VX,
class VY,
class VZ,
bool shr>
60 template<
class VX,
class VY,
class VZ,
bool shr>
64 :
ViewBase<VX,VY,VZ>(home,share,p) {}
66 template<
class VX,
class VY,
class VZ,
bool shr>
72 template<
class VX,
class VY,
class VZ,
bool shr>
#define GECODE_REWRITE(prop, post)
Rewrite propagator by executing post function.
int atleast(void) const
How many views are at least equal.
LqView(Space &home, bool share, LqView &p)
Constructor for cloning p.
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)
Propagation has computed fixpoint.
Base-class for both propagators and branchers.
Propagator for counting views (less or equal integer 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.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
Propagator for counting views (less or equal to number of equal views)
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Post propagator for SetVar SetOpType SetVar y
Post propagator for SetVar x
Propagation has not computed fixpoint.
Gecode toplevel namespace
ExecStatus post_false(Home home, VX x, ConstIntView y)
int size(void) const
Return size of array (number of elements)
int ModEventDelta
Modification event deltas.
Home class for posting propagators