Go to the documentation of this file.
40 #ifndef __GECODE_INT_COUNT_HH__
41 #define __GECODE_INT_COUNT_HH__
50 namespace Gecode {
namespace Int {
namespace Count {
69 void cancel(Space& home, Propagator&
p, VY
y);
132 namespace Gecode {
namespace Int {
namespace Count {
138 template<
class VX,
class VY>
172 template<
class VX,
class VY>
202 template<
class VX,
class VY>
232 template<
class VX,
class VY>
260 namespace Gecode {
namespace Int {
namespace Count {
266 template<
class VX,
class VY,
class VZ>
309 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
344 template<
class VX,
class VY,
class VZ,
bool shr>
379 template<
class VX,
class VY,
class VZ,
bool shr,
bool dom>
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
EqInt(Space &home, bool share, EqInt &p)
Constructor for cloning p.
GqInt(Space &home, bool share, GqInt &p)
Constructor for cloning p.
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.
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 Actor * copy(Space &home, bool share)
Create copy during cloning.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
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.
IntBase(Space &home, bool share, IntBase &p)
Constructor for cloning p.
ExecStatus post_false(Home home, VX x, ConstIntView y)
GqView(Space &home, bool share, GqView &p)
Constructor for cloning p.
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.
ViewBase(Space &home, bool share, ViewBase &p)
Constructor for cloning p.
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 Actor * copy(Space &home, bool share)
Create copy during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
void reschedule(Space &home, Propagator &p, IntSet &y)
LqView(Space &home, bool share, LqView &p)
Constructor for cloning p.
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, bool share)
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.
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 PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
void cancel(Space &home, Propagator &p, IntSet &y)
EqView(Space &home, bool share, EqView &p)
Constructor for cloning p.
int c
Number of views which are equal and have been eliminated.
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.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
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.
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.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
int ModEventDelta
Modification event deltas.
int n_s
Views from x[0] ... x[n_s-1] have subscriptions.
LqInt(Space &home, bool share, LqInt &p)
Constructor for cloning p.
int p
Number of positive literals for node type.