Go to the documentation of this file.
36 #ifndef __GECODE_INT_COUNT_HH__
37 #define __GECODE_INT_COUNT_HH__
46 namespace Gecode {
namespace Int {
namespace Count {
65 void cancel(Space& home, Propagator&
p, VY
y);
131 namespace Gecode {
namespace Int {
namespace Count {
137 template<
class VX,
class VY>
171 template<
class VX,
class VY>
201 template<
class VX,
class VY>
231 template<
class VX,
class VY>
259 namespace Gecode {
namespace Int {
namespace Count {
265 template<
class VX,
class VY,
class VZ>
308 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
343 template<
class VX,
class VY,
class VZ,
bool shr>
378 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Post propagator for SetVar x
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
IntBase(Space &home, IntBase &p)
Constructor for cloning p.
Post propagator for SetVar SetOpType SetVar y
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Propagator for counting views (less or equal to number of equal views)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
LqInt(Space &home, LqInt &p)
Constructor for cloning p.
Propagator for counting views (less or equal integer to number of equal views)
int atmost(void) const
How many views are at most equal.
Base-class for count propagators (view)
VZ z
View which yields result of counting.
ExecStatus post_false(Home home, VX x, ConstIntView y)
int atleast(void) const
How many views are at least equal.
virtual void reschedule(Space &home)
Schedule function.
void count(Space &home)
Count how many views are equal now.
Propagator for counting views (equal integer to number of equal views)
Base-class for both propagators and branchers.
GqInt(Space &home, GqInt &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Create copy during cloning.
Gecode toplevel namespace
Base-class for propagators.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
bool isintset(VY y)
Return whether y is an integer set.
Baseclass for count propagators (integer)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
void update(IntSet &y, Space &home, IntSet &py)
void reschedule(Space &home, Propagator &p, IntSet &y)
Propagator for counting views (greater or equal integer to number of equal views)
ViewArray< VX > x
Views still to count.
Home class for posting propagators
virtual Actor * copy(Space &home)
Create copy during cloning.
ViewArray< VX > x
Views still to count.
ExecStatus post_true(Home home, VX x, ConstIntView y)
ModEventDelta med
A set of modification events (used during propagation)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
bool isval(VY y)
Return whether y is a value.
virtual Actor * copy(Space &home)
Create copy during cloning.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
virtual Actor * copy(Space &home)
Create copy during cloning.
GqView(Space &home, GqView &p)
Constructor for cloning p.
EqView(Space &home, EqView &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
ViewBase(Space &home, ViewBase &p)
Constructor for cloning p.
void cancel(Space &home, Propagator &p, IntSet &y)
int c
Number of views which are equal and have been eliminated.
bool shared(const IntSet &, VX)
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
static bool sharing(const ViewArray< VX > &x, const VY &y, const VZ &z)
Test whether there is sharing of z with x or y.
Propagator for counting views (equal to number of equal views)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual void reschedule(Space &home)
Schedule function.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
RelTest
Result of testing relation.
virtual Actor * copy(Space &home)
Create copy during cloning.
RelTest holds(VX x, ConstIntView y)
Test whether x and y are equal.
Propagator for counting views (greater or equal to number of equal views)
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
void subscribe(Space &home, Propagator &p, IntSet &y)
int c
Number of views which are equal and have been eliminated.
int ModEventDelta
Modification event deltas.
int n_s
Views from x[0] ... x[n_s-1] have subscriptions.
int p
Number of positive literals for node type.
EqInt(Space &home, EqInt &p)
Constructor for cloning p.
LqView(Space &home, LqView &p)
Constructor for cloning p.
virtual Actor * copy(Space &home)
Create copy during cloning.