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.
int atleast(void) const
How many views are at least equal.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ViewArray< VX > x
Views still to count.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
LqView(Space &home, bool share, LqView &p)
Constructor for cloning p.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
int n_s
Views from x[0] ... x[n_s-1] have subscriptions.
void cancel(Space &home, Propagator &p, IntSet &y)
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)
RelTest holds(VX x, ConstIntView y)
Test whether x and y are equal.
Base-class for propagators.
Baseclass for count propagators (integer)
bool isval(VY y)
Return whether y is a value.
Propagator for counting views (equal to number of equal views)
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
EqInt(Space &home, bool share, EqInt &p)
Constructor for cloning p.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
Base-class for both propagators and branchers.
Propagator for counting views (less or equal integer to number of equal views)
Propagator for counting views (greater or equal to number of equal views)
EqView(Space &home, bool share, EqView &p)
Constructor for cloning p.
int p
Number of positive literals for node type.
ViewBase(Space &home, bool share, ViewBase &p)
Constructor for cloning p.
Propagator for counting views (equal integer to number of equal views)
ViewArray< VX > x
Views still to count.
int c
Number of views which are equal and have been eliminated.
RelTest
Result of testing relation.
void count(Space &home)
Count how many views are equal now.
void subscribe(Space &home, Propagator &p, IntSet &y)
GqInt(Space &home, bool share, GqInt &p)
Constructor for cloning p.
ModEventDelta med
A set of modification events (used during propagation)
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, VZ z, int c)
Post propagator for .
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)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
int c
Number of views which are equal and have been eliminated.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual void reschedule(Space &home)
Schedule function.
virtual Actor * copy(Space &home, bool share)
Create copy during cloning.
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) ...
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Post propagator for SetVar SetOpType SetVar y
virtual void reschedule(Space &home)
Schedule function.
IntBase(Space &home, bool share, IntBase &p)
Constructor for cloning p.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
Post propagator for SetVar x
bool isintset(VY y)
Return whether y is an integer set.
int atmost(void) const
How many views are at most equal.
LqInt(Space &home, bool share, LqInt &p)
Constructor for cloning p.
Gecode toplevel namespace
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
ExecStatus post_false(Home home, VX x, ConstIntView y)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
static ExecStatus post(Home home, ViewArray< VX > &x, VY y, int c)
Post propagator for .
void reschedule(Space &home, Propagator &p, IntSet &y)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
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)